/* =========================================================================
   FICHIER : assets/css/home.css
   Home page ugosansh.fr — scroll storytelling
   ========================================================================= */
 
:root {
    --c-dark:            #0a0a0a;
    --c-light:           #f5f5f5;
    --accent-builder:    #6366f1;
    --accent-mindset:    #f97316;
    --split-1:           50%;
    --split-2:           100%;
    --split-3:           0%;
    --cta-opacity:       0;
}
 
* { box-sizing: border-box; margin: 0; padding: 0; }
 
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--c-dark);
    color: var(--c-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
 
/* -------------------------------------------------------------------------
   GRAIN
   ------------------------------------------------------------------------- */
.with-noise::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}
 
/* -------------------------------------------------------------------------
   UTILITAIRES
   ------------------------------------------------------------------------- */
.difference-blend {
    mix-blend-mode: difference;
    color: #ffffff;
    z-index: 10;
}
 
/* -------------------------------------------------------------------------
   BOUTONS
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    letter-spacing: 0;
    position: relative;
    z-index: 10;
}
.btn:hover { transform: translateY(-3px); letter-spacing: 0.04em; }
.btn-white { background: var(--c-light); color: var(--c-dark); }
.btn-white:hover { box-shadow: 0 0 40px rgba(99,102,241,0.5), 0 8px 24px rgba(0,0,0,0.3); }
.btn-dark  { background: var(--c-dark);  color: var(--c-light); }
.btn-dark:hover  { box-shadow: 0 0 40px rgba(249,115,22,0.4), 0 8px 24px rgba(0,0,0,0.15); }
 
/* -------------------------------------------------------------------------
   NAV
   ------------------------------------------------------------------------- */
.nav-home {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 2rem;
    text-align: center;
    z-index: 100;
    mix-blend-mode: difference;
    color: #ffffff;
    pointer-events: none;
}
.nav-home .logo {
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    color: #ffffff;
    pointer-events: auto;
    letter-spacing: -0.05em;
}
 
/* =========================================================================
   SECTION 1 — HERO
   ========================================================================= */
.sec-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}
.split-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--c-dark) 50%, var(--c-light) 50%);
    z-index: -1;
}
/* Ligne centrale gradient indigo→orange */
.split-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 1px; height: 100%;
    background: linear-gradient(to bottom,
        var(--accent-builder) 0%,
        rgba(255,255,255,0.1) 40%,
        rgba(255,255,255,0.1) 60%,
        var(--accent-mindset) 100%
    );
    opacity: 0.6;
    transform-origin: top;
    transform: scaleY(0);
    animation: growLine 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 800ms;
}
@keyframes growLine { to { transform: scaleY(1); } }
 
.hero-content h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    font-weight: 900;
}
.hero-content h1 .word {
    display: inline-block;
    clip-path: inset(100% 0 0 0);
    transform: translateY(20px);
    animation: revealWord 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes revealWord {
    to { clip-path: inset(0 0 0 0); transform: translateY(0); }
}
.hero-content h1 .word:nth-child(1) { animation-delay: 0ms; }
.hero-content h1 .word:nth-child(2) { animation-delay: 80ms; }
.hero-content h1 .word:nth-child(3) { animation-delay: 160ms; }
.hero-content h1 .word:nth-child(4) { animation-delay: 240ms; }
.hero-content h1 .word:nth-child(5) { animation-delay: 320ms; }
.hero-content h1 .word:nth-child(6) { animation-delay: 400ms; }
.hero-content h1 .word:nth-child(7) { animation-delay: 480ms; }
 
.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    line-height: 1.6;
    animation: fadeUp 800ms ease forwards 800ms;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 0.85; transform: translateY(0); }
}
 
/* Scroll indicator */
.scroll-indicator {
    margin-top: 3.5rem;
    display: inline-flex;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 800ms ease forwards 1000ms;
}
.scroll-dot { animation: scrollBounce 1.5s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
@keyframes scrollBounce {
    0%       { transform: translateY(0); opacity: 1; }
    80%,100% { transform: translateY(16px); opacity: 0; }
}
 
/* =========================================================================
   SECTION 2 — PROFIL : photo + stats + présentation
   ========================================================================= */
.sec-profile {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}
.profile-split-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--c-dark) 50%, var(--c-light) 50%);
    z-index: 0;
}
.profile-col {
    position: relative;
    z-index: 1;
    padding: 7rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.profile-col-dark { color: var(--c-light); }
.profile-col-light { color: var(--c-dark); }
 
/* Photo */
.profile-photo-wrap {
    margin-bottom: 2.5rem;
}
.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.15);
    display: block;
}
.profile-col-light .profile-photo {
    border-color: rgba(0,0,0,0.12);
}
 
.profile-col h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.profile-col p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.8;
    max-width: 380px;
    margin-bottom: 2rem;
}
 
/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.stat-item {
    padding: 1.2rem;
    border-radius: 12px;
}
.profile-col-dark .stat-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
}
.profile-col-light .stat-item {
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.1);
}
.stat-number {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}
.profile-col-dark .stat-number  { color: var(--accent-builder); }
.profile-col-light .stat-number { color: var(--accent-mindset); }
.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
 
/* Tags compétences */
.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.skill-tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    letter-spacing: 0.02em;
}
.profile-col-dark .skill-tag {
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: rgba(255,255,255,0.8);
}
.profile-col-light .skill-tag {
    background: rgba(249,115,22,0.1);
    border: 1px solid rgba(249,115,22,0.3);
    color: rgba(0,0,0,0.75);
}
 
/* =========================================================================
   SECTION 3 — PROJETS (cards enrichies)
   ========================================================================= */
.sec-projects {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}
.proj-split-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--c-dark) 50%, var(--c-light) 50%);
    z-index: 0;
}
.proj-col {
    position: relative;
    z-index: 1;
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}
.proj-col-dark { color: var(--c-light); }
.proj-col-light { color: var(--c-dark); }
 
.proj-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}
.proj-col-dark  .proj-col-title { color: var(--accent-builder); opacity: 1; }
.proj-col-light .proj-col-title { color: var(--accent-mindset); opacity: 1; }
 
.card {
    padding: 1.75rem;
    border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.proj-col-dark .card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.proj-col-dark .card:hover {
    transform: translateY(-6px);
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 20px rgba(99,102,241,0.1);
}
.proj-col-light .card {
    background: rgba(0,0,0,0.025);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.proj-col-light .card:hover {
    transform: translateY(-6px);
    border-color: rgba(249,115,22,0.5);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1), 0 0 20px rgba(249,115,22,0.08);
}
 
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 1rem;
}
.card-header h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.card-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.7;
    white-space: nowrap;
    margin-top: 4px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green  { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.6); }
.dot-yellow { background: #eab308; box-shadow: 0 0 8px rgba(234,179,8,0.6); }
.dot-blue   { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.6); }
 
.card-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.75;
    margin-bottom: 1rem;
}
.card-learning {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.5;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 6px;
}
.proj-col-light .card-learning {
    border-top-color: rgba(0,0,0,0.08);
}
.card-learning::before {
    content: "→";
    opacity: 0.6;
}
 
/* =========================================================================
   TRANSITIONS
   ========================================================================= */
.trans-wrapper { height: 200vh; position: relative; }
.trans-sticky {
    position: sticky; top: 0;
    height: 100vh; width: 100%;
    overflow: hidden; will-change: transform;
}
 
#trans-1 .trans-sticky { background-color: var(--c-light); }
#trans-1 .layer-dark {
    position: absolute; inset: 0;
    background-color: var(--c-dark);
    clip-path: polygon(0 0, var(--split-1) 0, var(--split-1) 100%, 0 100%);
    will-change: clip-path;
}
#trans-2 .trans-sticky { background-color: var(--c-dark); }
#trans-2 .layer-light {
    position: absolute; inset: 0;
    background-color: var(--c-light);
    clip-path: polygon(0 var(--split-2), 100% var(--split-2), 100% 100%, 0 100%);
    will-change: clip-path;
}
#trans-3 .trans-sticky { background-color: var(--c-light); }
#trans-3 .layer-dark {
    position: absolute; inset: 0;
    background-color: var(--c-dark);
    clip-path: polygon(0 0, var(--split-3) 0, var(--split-3) 100%, 0 100%);
    will-change: clip-path;
}
 
/* =========================================================================
   SECTIONS UNIVERS — BUILDER & MINDSET
   ========================================================================= */
.sec-full {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    overflow: hidden;
}
.bg-dark  { background-color: var(--c-dark);  color: var(--c-light); }
.bg-light { background-color: var(--c-light); color: var(--c-dark); }
 
/* Glow ambiance */
.bg-dark::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 500px;
    background: radial-gradient(ellipse at center, rgba(99,102,241,0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.bg-light::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 500px;
    background: radial-gradient(ellipse at center, rgba(249,115,22,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
 
/* Typo décorative */
.bg-text {
    position: absolute;
    right: -2%; top: 50%;
    transform: translateY(-50%);
    font-size: 20vw; font-weight: 900;
    line-height: 1;
    user-select: none; pointer-events: none;
    letter-spacing: -0.05em; z-index: 0;
}
.bg-text-dark  { color: rgba(255,255,255,0.025); }
.bg-text-light { color: rgba(0,0,0,0.035); }
 
.sec-full h2,
.sec-full .sub,
.sec-full .pillars,
.sec-full .btn { position: relative; z-index: 10; }
 
.sec-full h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.sec-full .sub {
    font-size: 1.15rem;
    max-width: 560px;
    margin: 0 auto 3.5rem;
    opacity: 0.75;
    line-height: 1.65;
}
 
/* Piliers */
.pillars {
    display: flex;
    gap: 3.5rem;
    justify-content: center;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}
.pillar {
    position: relative;
    font-size: 1.4rem;
    font-weight: 700;
    padding-bottom: 8px;
    letter-spacing: -0.01em;
}
.pillar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 2px; width: 0;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.bg-dark  .pillar::after { background: var(--accent-builder); }
.bg-light .pillar::after { background: var(--accent-mindset); }
.pillar.is-visible::after { width: 100%; }
 
/* =========================================================================
   CTA FINAL
   ========================================================================= */
.cta-content {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 2rem; z-index: 20;
}
.cta-fade { opacity: var(--cta-opacity); will-change: opacity; }
 
.cta-content h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 2rem;
}
/* Blanc = toujours visible sur fond sombre, invisible sur fond clair */
.cta-word-light {
    color: #ffffff;
}
/* Noir = invisible sur fond sombre, visible sur fond clair */
/* On utilise mix-blend-mode: difference sur ce span uniquement */
.cta-word-dark {
    mix-blend-mode: difference;
    color: #ffffff;
}
.cta-form {
    display: flex; gap: 0.5rem;
    background: #ffffff; padding: 0.4rem;
    border-radius: 50px; width: 100%; max-width: 480px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.cta-form input {
    flex: 1; border: none; background: transparent;
    padding: 0 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem; color: var(--c-dark); outline: none;
}
.cta-form input::placeholder { color: #999; }
.cta-sub {
    margin-top: 1.25rem;
    font-size: 0.85rem; font-weight: 600;
    opacity: 0.85;
}
/* Réutilise .cta-word-light et .cta-word-dark définis plus haut */
 
/* =========================================================================
   FOOTER
   ========================================================================= */
.footer-home {
    background: var(--c-dark);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 2rem 0;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-logo {
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: 1.1rem;
    color: var(--c-light);
}
.footer-copy {
    font-size: 0.8rem;
    opacity: 0.4;
    color: var(--c-light);
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-light);
    opacity: 0.5;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.footer-links a:hover { opacity: 1; }
 
/* =========================================================================
   MOBILE
   ========================================================================= */
@media (max-width: 768px) {
    .sec-hero   { padding: 1.5rem; }
    .sec-full h2 { font-size: 2rem; }
    .cta-content h2 { font-size: 1.6rem; }
    .bg-text { font-size: 35vw; right: -5%; }
    .pillars { gap: 1.5rem; flex-direction: column; }
 
    .split-bg {
        background: linear-gradient(to bottom, var(--c-dark) 50%, var(--c-light) 50%);
    }
    .split-bg::after {
        top: 50%; left: 0; width: 100%; height: 1px;
        transform-origin: left; transform: scaleX(0);
        background: linear-gradient(to right, var(--accent-builder), var(--accent-mindset));
        animation-name: growLineMobile;
    }
    @keyframes growLineMobile { to { transform: scaleX(1); } }
 
    .sec-profile  { grid-template-columns: 1fr; }
    .sec-projects { grid-template-columns: 1fr; }
    .profile-col, .proj-col { padding: 4rem 2rem; }
    .stats-row { grid-template-columns: 1fr 1fr; }
 
    .cta-form {
        flex-direction: column; background: transparent;
        box-shadow: none; padding: 0; gap: 1rem;
    }
    .cta-form input {
        background: #fff; padding: 1.1rem 1.5rem;
        border-radius: 12px;
    }
    .cta-form .btn { width: 100%; border-radius: 12px; }
 
    #trans-1 .layer-dark {
        clip-path: polygon(0 0, 100% 0, 100% var(--split-1), 0 var(--split-1));
    }
    #trans-3 .layer-dark {
        clip-path: polygon(0 0, 100% 0, 100% var(--split-3), 0 var(--split-3));
    }
 
    .footer-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
}
 
/* =========================================================================
   REDUCED MOTION
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-content h1 .word { clip-path: inset(0 0 0 0); transform: none; }
    .split-bg::after { transform: scale(1); }
    .pillar::after { width: 100%; }
}