:root {
    --color-primary: #1A2236;
    --color-accent: #5971B0;
    --color-surface: #FFFFFF;
    --color-background: #F1F1F1;
    --color-text: #1A2236;
    --color-text-soft: #5E6578;
    --color-border: #D9DDE7;
    --color-success-bg: #EAF1FF;
    --color-success-text: #3256A8;
    --color-error-bg: #FDEDED;
    --color-error-text: #A33A3A;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 8px 24px rgba(26, 34, 54, 0.08);
    --shadow-hover: 0 12px 28px rgba(26, 34, 54, 0.12);
    --container-width: 82rem;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: var(--color-text);
}

* {
    box-sizing: border-box;
}

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

    a:hover {
        text-decoration: underline;
    }

.page-section {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

.hero {
    padding: 5rem 1.5rem 3rem 1.5rem;
    display: flex;
    justify-content: center;
}

.hero-content {
    max-width: 900px;
    text-align: center;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.hero-content h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    margin: 0 0 0.75rem 0;
    color: var(--color-primary);
}

.hero-content h2 {
    font-size: 1.45rem;
    font-weight: 500;
    color: var(--color-text-soft);
    margin: 0 0 1rem 0;
}

.hero-description,
.hero-content p {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--color-text-soft);
    max-width: 720px;
    margin: 0 auto 2rem auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-outline,
.btn-chatbot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.875rem;
    padding: 0.85rem 1.3rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 0.5rem 1.25rem rgba(24, 35, 59, 0.18);
}

    .btn-primary:hover {
        background: #111827;
        text-decoration: none;
        transform: translateY(-0.125rem);
        box-shadow: 0 0.75rem 1.5rem rgba(24, 35, 59, 0.24);
    }

.btn-secondary {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 0.5rem 1.25rem rgba(98, 125, 204, 0.22);
}

    .btn-secondary:hover {
        background: #4E66A4;
        text-decoration: none;
        transform: translateY(-0.125rem);
        box-shadow: 0 0.75rem 1.5rem rgba(24, 35, 59, 0.24);
    }

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-border);
}

    .btn-outline:hover {
        background: white;
        text-decoration: none;
        border-color: var(--color-accent);
    }

.btn-chatbot {
    position: relative;
    overflow: hidden;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: 0 10px 25px rgba(98, 125, 204, 0.35);
    animation: pulse 2.5s infinite;
}
    .btn-chatbot:hover {
        color: white;
        background: var(--color-primary);
        text-decoration: none;
        transform: translateY(-0.125rem);
        box-shadow: 0 0.75rem 1.5rem rgba(24, 35, 59, 0.24);
    }

    .btn-chatbot::before {
        content: "";
        position: absolute;
        top: 0;
        left: -75%;
        width: 50%;
        height: 100%;
        background: linear-gradient( 120deg, transparent, rgba(255, 255, 255, 0.6), transparent );
        transform: skewX(-20deg);
    }

    .btn-chatbot::after {
        content: "";
        position: absolute;
        inset: -0.16rem;
        border-radius: inherit;
        background: var(--color-primary);
        z-index: -1;
        box-shadow: 0 0 0 0.16rem var(--color-primary);
    }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(98, 125, 204, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(98, 125, 204, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(98, 125, 204, 0);
    }
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.info-grid {
    display: flex;
    flex-direction: row;
    align-content: center;
    gap: 1.75rem;
}
@media (max-width: 75rem) { /* 1200px */
    .projects-grid, .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 48rem) { /* 768px */
    .projects-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card,
.project-card,
.contact-card {
    position: relative;
    backdrop-filter: blur(0.75rem);
    -webkit-backdrop-filter: blur(0.75rem);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(26, 34, 54, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    .project-card:hover,
    .info-card:hover,
    .contact-card:hover {
        transform: translateY(-0.25rem);
        box-shadow: var(--shadow-hover);
        border-color: rgba(98, 125, 204, 0.22);
    }

    .project-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 1.25rem;
        right: 1.25rem;
        height: 0.33rem;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--color-accent), #9CB2EA);
    }

.info-card,
.project-card {
    padding: 1.75rem;
    width: 100%;
}

    .info-card h3,
    .project-card h3 {
        margin-top: 0;
        margin-bottom: 1rem;
        color: var(--color-primary);
        font-size: 1.85rem;
        line-height: 1.1;
        letter-spacing: -0.02em;
    }

    
    .project-card p {
        margin: 0rem 0;
        line-height: 1.6;
        color: var(--color-text-soft);
    }

    .project-card ul {
        color: var(--color-text-soft);
    }

    .info-card li,
    .info-card p {
        margin: 0.6rem 0;
        line-height: 1.6;
        color: var(--color-text-soft);
    }

.page-section h1,
.page-section h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--color-primary);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-section ul {
    padding-left: 1.2rem;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--color-primary);
/*    background: rgba(24, 35, 59, 0.92);*/
    backdrop-filter: blur(0.75rem);
    -webkit-backdrop-filter: blur(0.75rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .nav-brand a {
        color: white;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.15rem;
    }

.nav-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    background: transparent;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    flex-wrap: nowrap;
}

    .nav-links a {
        color: rgba(255, 255, 255, 0.82);
        text-decoration: none;
        font-weight: 500;
        position: relative;
        transition: color 0.18s ease;
    }
        .nav-links a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -0.35rem;
            width: 100%;
            height: 0.125rem;
            background: var(--color-accent);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.18s ease;
        }

        .nav-links a:hover {
            color: white;
        }

        .nav-links a:hover::after {
            transform: scaleX(1);
        }

@media (max-width: 64rem) {
    .top-nav {
        padding: 0.9rem 1rem;
    }

    .nav-links {
        gap: 0.8rem;
    }

        .nav-links a {
            font-size: 0.95rem;
        }

    .nav-brand a {
        font-size: 1rem;
    }
}

@media (max-width: 48rem) {
    .top-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .nav-brand {
        justify-content: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1rem;
        width: 100%;
    }
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2rem;
    align-items: start;
}

.contact-card {
    padding: 2rem;
}

.contact-intro h1 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.contact-intro p {
    color: var(--color-text-soft);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.contact-meta {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.contact-meta-item {
    padding: 1rem 1.1rem;
    background: #F7F8FC;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.contact-meta-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-soft);
    margin-bottom: 0.3rem;
}

.contact-meta-value {
    color: var(--color-primary);
    font-weight: 600;
    word-break: break-word;
}

.contact-form {
    display: grid;
    gap: 1.15rem;
}

.form-group {
    display: grid;
    gap: 0.45rem;
}

.form-label {
    font-weight: 600;
    color: var(--color-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--color-text);
    padding: 0.9rem 1rem;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-input {
    min-height: 46px;
}

.form-textarea {
    min-height: 170px;
    resize: vertical;
}

    .form-input:focus,
    .form-textarea:focus,
    .chat-input input:focus {
        outline: none;
        border-color: var(--color-accent);
        box-shadow: 0 0 0 4px rgba(89, 113, 176, 0.14);
    }

.validation-message {
    color: #B14444;
    font-size: 0.9rem;
}

.form-alert {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

    .form-alert.success {
        background: var(--color-success-bg);
        color: var(--color-success-text);
        border: 1px solid rgba(89, 113, 176, 0.18);
    }

    .form-alert.error {
        background: var(--color-error-bg);
        color: var(--color-error-text);
        border: 1px solid rgba(163, 58, 58, 0.16);
    }

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.form-helper {
    color: var(--color-text-soft);
    font-size: 0.95rem;
}

.contact-photo {
    width: 100%;
    max-width: 360px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: block;
    object-fit: cover;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .top-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-message {
        max-width: 100%;
    }
}
.validation-message,
.validation-message div,
.validation-message.validation-message {
    color: #B14444;
    font-size: 0.9rem;
}

.home-hero {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 4.5rem 1.5rem 3rem 1.5rem;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
}

.home-hero-text h1 {
    font-size: clamp(2.8rem, 5vw, 4.6rem);
    line-height: 1.05;
    margin: 0 0 0.9rem 0;
    color: var(--color-primary);
    letter-spacing: -0.04em;
}

    .home-hero-text h1 span {
        color: var(--color-accent);
    }

.home-hero-text h2 {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--color-text-soft);
    margin: 0 0 1.2rem 0;
}

.home-hero-text .hero-description {
    margin: 0 0 2rem 0;
    max-width: 38rem;
    font-size: 1.06rem;
}

.home-hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.portrait-frame {
    width: min(100%, 30rem);
    padding: 0.9rem;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(98, 125, 204, 0.18), transparent 55%), linear-gradient(145deg, rgba(255,255,255,0.7), rgba(255,255,255,0.2));
    box-shadow: var(--shadow-medium);
}

.hero-portrait {
    display: block;
    width: 100%;
    object-fit: contain;
    border-radius: 50%;
}

@media (max-width: 900px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
    }

    .home-hero-text {
        text-align: center;
    }

        .home-hero-text .hero-description {
            margin-left: auto;
            margin-right: auto;
        }

        .home-hero-text h1 {
            font-size: 2.7rem;
        }

    .home-hero-visual {
        order: -1;
    }
}



.chat-box {
    border: 1px solid var(--color-border);
    padding: 1.2rem;
    height: 24rem;
    overflow-y: auto;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-message {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    margin: 0.5rem 0;
    max-width: 78%;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.55;
    display: inline-block;
    box-shadow: 0 0.375rem 1rem rgba(24, 35, 59, 0.06);
}

    /* USER (droite) */
    .chat-message.user {
        background: linear-gradient(135deg, #7590D5, var(--color-accent));
        color: white;
        margin-left: auto;
        border-bottom-right-radius: 0.4rem;
        text-align: right;
    }

    /* BOT (gauche) */
    .chat-message.bot {
        background: #EEF1F7;
        color: var(--color-primary);
        margin-right: auto;
        border-bottom-left-radius: 0.4rem;
    }

    /* texte dans la bulle */
    .chat-message strong {
        font-weight: 600;
    }

    /* petit spacing */
    .chat-message + .chat-message {
        margin-top: 2px;
    }


.chat-suggestions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.chat-input input {
    flex: 1;
    min-height: 46px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0 0.9rem;
    background: white;
}

.chat-input {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 1rem;
}

.chat-text-input {
    flex: 1;
    min-height: 3rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0 1rem;
    background: white;
    color: var(--color-text);
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .chat-text-input:focus {
        outline: none;
        border-color: var(--color-accent);
        box-shadow: 0 0 0 4px rgba(89, 113, 176, 0.14);
    }

.chat-input .btn-secondary {
    min-width: 110px;
}

.icon {
    max-width: 2rem;
    margin: 0.2rem 0.6rem 0.2rem 0;
}