/* ============================================================
   Hero — page d'accueil
   Split diagonal noir / portrait, ligne de données animée.
   ============================================================ */

.hero {
    position: relative;
    height: 100svh;
    min-height: 640px;
    background: var(--coal);
    overflow: hidden;
}

/* Portrait */
.hero-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: 62%;
    height: 100%;
    z-index: 10;
    animation: heroPhoto 1.4s var(--ease) both;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0;
    filter: grayscale(.2) contrast(1.05) brightness(.96);
}

.hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(11, 11, 13, .6), transparent 30%),
        linear-gradient(to right, rgba(11, 11, 13, .55), transparent 34%);
}

/* Panneau noir diagonal */
.hero-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 56%;
    height: 100%;
    background: var(--coal);
    clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
    z-index: 20;
}

/* Ligne de données le long de la diagonale */
.hero-diagonal {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

.hero-diagonal svg {
    width: 100%;
    height: 100%;
}

.diagonal-flow {
    animation: dataFlow 3.2s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(111, 160, 255, .8));
}

/* Contenu */
.hero-content {
    position: relative;
    z-index: 40;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content .container {
    width: 100%;
}

.hero-text {
    max-width: 54%;
    color: var(--bone);
}

.hero .kicker {
    color: var(--bone-soft);
    animation: heroFade 1s var(--ease) .25s both;
}

.hero-text h1 {
    font-size: clamp(56px, 9.5vw, 128px);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: .94;
    margin: 8px 0 34px;
    color: var(--bone);
}

.hero-text h1 em {
    -webkit-text-stroke-width: 2px;
}

.hero-line {
    display: block;
    overflow: hidden;
    padding-bottom: .06em;
    margin-bottom: -.06em;
}

.hero-line > span {
    display: block;
    transform: translateY(112%);
    animation: heroLine 1s var(--ease) forwards;
}

.hero-line:nth-child(2) > span {
    animation-delay: .14s;
}

.hero-role {
    font-size: 17px;
    line-height: 1.7;
    color: var(--bone-soft);
    max-width: 420px;
    margin-bottom: 44px;
    animation: heroFade 1s var(--ease) .5s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    animation: heroFade 1s var(--ease) .65s both;
}

.hero-socials {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--line-dark);
    color: var(--bone);
    transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}

.social-link:hover {
    background: var(--bone);
    color: var(--ink);
    border-color: var(--bone);
    transform: translateY(-2px);
}

.social-link svg {
    width: 19px;
    height: 19px;
}

/* Pied de hero */
.hero-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding-bottom: 26px;
    animation: heroFade 1.2s var(--ease) .9s both;
}

.hero-foot-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.hero-foot-item {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--bone-soft);
}

.hero-foot-cert {
    color: var(--bone);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-foot-cert::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--blue);
}

.hero-avail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--bone);
    background: rgba(11, 11, 13, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    padding: 10px 16px;
}

.hero-avail b {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue-bright);
    animation: pulse 2.2s ease-out infinite;
}

.hero-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3em;
    color: var(--bone-soft);
}

.hero-scroll i {
    display: block;
    width: 1px;
    height: 46px;
    background: linear-gradient(to bottom, var(--bone-soft), transparent);
    overflow: hidden;
    animation: scrollHint 2.4s var(--ease) infinite;
}

/* ── Animations ── */
@keyframes heroLine {
    to {
        transform: translateY(0);
    }
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes heroPhoto {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes dataFlow {
    0% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
    25%, 75% {
        opacity: .9;
    }
    100% {
        stroke-dashoffset: -50;
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(111, 160, 255, .55);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(111, 160, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(111, 160, 255, 0);
    }
}

@keyframes scrollHint {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    45% {
        transform: scaleY(1);
        transform-origin: top;
    }
    55% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-line > span {
        transform: none;
        animation: none;
    }

    .hero-photo,
    .hero .kicker,
    .hero-role,
    .hero-actions,
    .hero-foot {
        animation: none;
        opacity: 1;
    }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-text {
        max-width: 62%;
    }

    .hero-text h1 {
        font-size: clamp(52px, 9vw, 96px);
    }
}

@media (max-width: 768px) {
    /* Colonne : texte → méta → photo pleine largeur (fini le fond délavé) */
    .hero {
        height: auto;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
    }

    .hero-panel,
    .hero-diagonal,
    .hero-scroll {
        display: none;
    }

    .hero-content {
        position: static;
        order: 1;
        height: auto;
        padding: 122px 0 36px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: clamp(46px, 13.5vw, 64px);
        letter-spacing: -.035em;
        margin-bottom: 24px;
    }

    .hero-text h1 em {
        -webkit-text-stroke-width: 1.5px;
    }

    .hero-role {
        font-size: 15.5px;
        margin-bottom: 32px;
    }

    .hero-actions {
        gap: 18px;
    }

    .hero-actions .btn {
        padding: 15px 22px;
    }

    .social-link {
        width: 42px;
        height: 42px;
    }

    .hero-foot {
        position: static;
        order: 2;
        padding-bottom: 22px;
    }

    .hero-foot-inner {
        justify-content: space-between;
        align-items: center;
    }

    .hero-foot-item {
        font-size: 9px;
        letter-spacing: .14em;
        white-space: nowrap;
    }

    .hero-avail {
        background: transparent;
        border: 1px solid var(--line-dark);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 9px 13px;
    }

    .hero-photo {
        position: static;
        order: 3;
        width: 100%;
        height: min(52vh, 440px);
        flex: 1 0 auto;
        opacity: 1;
        border-top: 1px solid var(--line-dark);
    }

    .hero-photo img {
        filter: grayscale(.2) contrast(1.05) brightness(.95);
        object-position: 50% 6%;
    }

    .hero-photo::after {
        background: linear-gradient(to bottom, rgba(11, 11, 13, .85), transparent 28%);
    }

    .hero-foot-cert {
        display: none;
    }
}
