/* ═══════════════════════════════════════════════════════════════════
   CortyKids — Layout
   Fichier: public/assets/css/layout.css
   
   Version 2.0 — Fond animé, hero 100vh, corrections mobile.
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   1. CONTAINERS
   ═══════════════════════════════════════════════════════════════════ */

.ck-container {
    width: 100%;
    max-width: var(--ck-container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.ck-container-sm { max-width: 640px; }
.ck-container-md { max-width: 900px; }
.ck-container-lg { max-width: 1100px; }

/* ═══════════════════════════════════════════════════════════════════
   2. GRILLES
   ═══════════════════════════════════════════════════════════════════ */

.ck-grid {
    display: grid;
    gap: 20px;
}

.ck-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ck-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ck-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ck-grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ═══════════════════════════════════════════════════════════════════
   3. SECTIONS
   ═══════════════════════════════════════════════════════════════════ */

.ck-section { padding: 60px 0; }
.ck-section-sm { padding: 32px 0; }
.ck-section-lg { padding: 90px 0; }

.ck-section-title {
    text-align: center;
    margin-bottom: 40px;
}

.ck-section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 12px;
}

.ck-section-title p {
    color: var(--ck-gray-500);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════
   4. FOND GLOBAL ANIMÉ (étoiles + aurores)
   ═══════════════════════════════════════════════════════════════════ */

.ck-bg-stars {
    position: fixed;
    inset: 0;
    z-index: -3;
    background: var(--ck-navy);
    overflow: hidden;
    pointer-events: none;
}

.ck-bg-stars::before,
.ck-bg-stars::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 217, 122, 0.6), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 80% 20%, rgba(76, 201, 240, 0.5), transparent),
        radial-gradient(1px 1px at 15% 80%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 45% 15%, rgba(247, 37, 133, 0.4), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(255, 217, 122, 0.4), transparent);
    background-size: 400px 400px;
    animation: bg-drift 60s linear infinite;
}

.ck-bg-stars::after {
    background-image:
        radial-gradient(1px 1px at 30% 50%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 70% 30%, rgba(210, 154, 43, 0.5), transparent),
        radial-gradient(1px 1px at 50% 90%, rgba(255, 217, 122, 0.4), transparent);
    background-size: 300px 300px;
    animation: bg-drift 90s linear infinite reverse;
}

.ck-bg-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.ck-bg-aurora::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 140%;
    height: 80%;
    background: radial-gradient(
        ellipse at 30% 40%,
        var(--ck-aurora-blue) 0%,
        var(--ck-aurora-pink) 30%,
        transparent 70%
    );
    filter: blur(60px);
    animation: aurora-shift 25s ease-in-out infinite alternate;
}

.ck-bg-aurora::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 140%;
    height: 80%;
    background: radial-gradient(
        ellipse at 70% 60%,
        var(--ck-aurora-gold) 0%,
        var(--ck-aurora-blue) 30%,
        transparent 70%
    );
    filter: blur(80px);
    animation: aurora-shift 30s ease-in-out infinite alternate-reverse;
}

.ck-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.ck-floating-crystal {
    position: absolute;
    animation: crystal-float 20s ease-in-out infinite;
    filter: blur(0.5px);
    will-change: transform;
}

/* ═══════════════════════════════════════════════════════════════════
   5. HEADER DESKTOP
   ═══════════════════════════════════════════════════════════════════ */

.ck-header {
    background: var(--ck-navy);
    color: var(--ck-white);
    height: var(--ck-header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--ck-shadow);
}

.ck-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--ck-container-max);
    margin: 0 auto;
    padding: 0 20px;
    gap: 24px;
}

.ck-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ck-white);
    font-family: var(--ck-font-title);
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: transform var(--ck-dur) var(--ck-ease-bounce);
}

.ck-logo:hover {
    transform: scale(1.05);
}

.ck-logo-text {
    background: var(--ck-grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ck-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ck-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--ck-radius);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.ck-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ck-gold);
}

.ck-nav a.active {
    background: rgba(210, 154, 43, 0.15);
    color: var(--ck-gold);
}

.ck-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   6. FOOTER
   ═══════════════════════════════════════════════════════════════════ */

.ck-footer {
    background: var(--ck-navy-dark);
    color: var(--ck-gray-300);
    padding: 48px 0 20px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.ck-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.ck-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ck-footer-brand h3 {
    color: var(--ck-gold);
    font-size: 1.2rem;
    margin: 0;
}

.ck-footer-brand p {
    color: var(--ck-gray-300);
    font-size: 0.9rem;
    margin: 0;
}

.ck-footer-col h4 {
    color: var(--ck-white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ck-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ck-footer-col li { margin-bottom: 8px; }

.ck-footer-col a {
    color: var(--ck-gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.ck-footer-col a:hover { color: var(--ck-gold); }

.ck-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ck-gray-500);
}

/* ═══════════════════════════════════════════════════════════════════
   7. HERO ANIMÉ
   ═══════════════════════════════════════════════════════════════════ */

.ck-hero {
    background: var(--ck-grad-hero);
    color: var(--ck-white);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.ck-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.ck-hero-title {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--ck-white);
    font-family: var(--ck-font-title);
}

.ck-hero-title-line {
    display: block;
    opacity: 0;
    animation: fade-in-up 0.6s var(--ck-ease-out) forwards;
}

.ck-hero-title-line:nth-child(1) { animation-delay: 0.2s; }
.ck-hero-title-line:nth-child(3) { animation-delay: 0.4s; }

.ck-hero-accent {
    display: inline-block;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    opacity: 0;
    animation: fade-in-scale 0.8s var(--ck-ease-bounce) 0.3s forwards;
}

.ck-shimmer {
    background: var(--ck-grad-gold-shimmer);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-text 3s linear infinite,
               fade-in-scale 0.8s var(--ck-ease-bounce) 0.3s forwards;
}

.ck-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--ck-gray-300);
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0;
    animation: fade-in-up 0.6s var(--ck-ease-out) 0.6s forwards;
}

.ck-hero-mascot-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ck-hero-mascot {
    font-size: 6rem;
    line-height: 1;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(76, 201, 240, 0.6));
}

.ck-hero-mascot-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(76, 201, 240, 0.5), transparent 60%);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    z-index: 1;
}

.ck-hero-mascot-ring {
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(255, 217, 122, 0.4);
    border-radius: 50%;
    border-top-color: transparent;
    border-right-color: transparent;
    animation: ring-spin 6s linear infinite;
}

.ck-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-in-up 0.6s var(--ck-ease-out) 0.8s forwards;
}

.ck-scroll-hint {
    margin-top: 60px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
    animation: bounce-down 2s ease-in-out infinite;
}

.ck-hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ck-hero-particle {
    position: absolute;
    border-radius: 50%;
    animation: particle-rise linear infinite;
}

/* Bulles décoratives */
.ck-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 217, 122, 0.15), transparent 70%);
    pointer-events: none;
    animation: float-bubble 6s ease-in-out infinite;
}

.ck-bubble-1 { width: 120px; height: 120px; top: 20%; left: 10%; }
.ck-bubble-2 { width: 80px; height: 80px; top: 60%; right: 15%; animation-delay: 1s; }
.ck-bubble-3 { width: 150px; height: 150px; bottom: 10%; left: 40%; animation-delay: 2s; }

/* Bouton glow */
.ck-btn-glow {
    position: relative;
    overflow: visible;
}

.ck-btn-glow::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: var(--ck-grad-gold);
    filter: blur(12px);
    opacity: 0.6;
    z-index: -1;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   8. SPACING UTILITAIRES
   ═══════════════════════════════════════════════════════════════════ */

.ck-mt-0 { margin-top: 0; }
.ck-mt-1 { margin-top: 8px; }
.ck-mt-2 { margin-top: 16px; }
.ck-mt-3 { margin-top: 24px; }
.ck-mt-4 { margin-top: 32px; }

.ck-mb-0 { margin-bottom: 0; }
.ck-mb-1 { margin-bottom: 8px; }
.ck-mb-2 { margin-bottom: 16px; }
.ck-mb-3 { margin-bottom: 24px; }
.ck-mb-4 { margin-bottom: 32px; }

/* ═══════════════════════════════════════════════════════════════════
   9. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* Tablette */
@media (max-width: 1023px) {
    .ck-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .ck-footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 767px) {
    .ck-grid-2,
    .ck-grid-3,
    .ck-grid-4 { grid-template-columns: 1fr; }

    .ck-section { padding: 40px 0; }
    .ck-section-lg { padding: 60px 0; }

    .ck-hero {
        padding: calc(var(--ck-header-height) + 40px) 0 60px;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height */
    }

    .ck-hero-mascot-wrap {
        width: 120px;
        height: 120px;
        margin-bottom: 20px;
    }

    .ck-hero-mascot { font-size: 4rem; }
    .ck-scroll-hint { margin-top: 30px; font-size: 1.5rem; }

    .ck-footer { padding: 32px 0 16px; }
    .ck-footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .ck-header { display: none; }

    /* Masquer les bulles décoratives sur mobile (perf) */
    .ck-bubble-1,
    .ck-bubble-3 { display: none; }
}