/* ============================================
   KIDA - Global Styles
   Charte graphique : Orange chaleureux, Poppins + Super Amore
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
    --color-primary: #FF8E53;
    --color-primary-dark: #e67a3f;
    --color-primary-light: #FFB88C;
    --color-text: #2D3748;
    --color-text-light: #718096;
    --color-bg: #F7FAFC;
    --color-white: #FFFFFF;
    --color-border: #E2E8F0;
    --color-success: #48BB78;
    --color-danger: #F56565;
    --font-display: 'Super Amore', cursive;
    --font-body: 'Poppins', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p {
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.8;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3.5rem;
    color: var(--color-text-light);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(255, 142, 83, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 142, 83, 0.5);
}

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

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
    padding: 0.85rem 1.5rem;
}

.btn-ghost:hover {
    color: var(--color-primary);
}

.btn-lg {
    padding: 1.1rem 2.8rem;
    font-size: 1.1rem;
}

/* ---- Navigation ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 0.7rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-logo span {
    font-family: var(--font-display), cursive;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

/* ---- Mobile menu (hidden by default) ---- */
.mobile-menu {
    display: none;
}

.mobile-overlay {
    display: none;
}

/* ---- Nav Account (logged-in state) ---- */
.nav-account {
    position: relative;
}

.nav-account-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-account-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #e67a3f));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-account-btn:hover .nav-account-avatar {
    box-shadow: 0 0 0 3px rgba(255, 142, 83, 0.3);
    transform: scale(1.05);
}

/* Dropdown */
.nav-account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.nav-account-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-account-header {
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-account-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text, #2D3748);
}

.nav-account-email {
    font-size: 0.8rem;
    color: var(--color-text-light, #718096);
}

.nav-account-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
}

.nav-account-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
    color: var(--color-text, #2D3748);
    text-decoration: none;
    transition: background 0.15s ease;
}

.nav-account-item:hover {
    background: #f7f7f7;
}

.nav-account-item svg {
    width: 16px;
    height: 16px;
}

/* Mobile account section */
.mobile-account-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-account-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text, #2D3748);
}

.mobile-account-info .nav-account-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

/* ---- Lucide Icons ---- */
[data-lucide] {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- Sections ---- */
section {
    padding: 6rem 0;
}

/* ---- Cards ---- */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--color-border);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* ---- Footer ---- */
.footer {
    background: var(--color-text);
    color: var(--color-white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    margin-top: 1rem;
    font-size: 0.95rem;
}

.footer-col h4 {
    color: var(--color-white);
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--color-primary-light);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ---- Animations ---- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    /* Mobile menu overlay */
    .mobile-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--color-white);
        box-shadow: var(--shadow-xl);
        padding: 5rem 2rem 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-menu.open {
        right: 0;
    }

    .mobile-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        font-weight: 500;
        border-bottom: 1px solid var(--color-border);
    }

    .mobile-menu .btn {
        margin-top: 1rem;
        text-align: center;
    }

    .mobile-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}
