/* =========================================================
   PORTFOLIO LAURENT MAGUIN-VREUX
   Style général — DAO & BIM
   ========================================================= */

/* ---------- Variables ---------- */

:root {
    --navy: #172536;
    --navy-light: #24364a;
    --blue: #1478d4;
    --blue-dark: #0d62ad;
    --blue-light: #eaf4fd;

    --text: #263445;
    --text-light: #667487;
    --white: #ffffff;
    --background: #f5f7fa;
    --border: #e2e7ed;

    --shadow: 0 10px 30px rgba(23, 37, 54, 0.08);
    --shadow-hover: 0 16px 38px rgba(23, 37, 54, 0.14);

    --radius: 14px;
    --container: 1200px;

    --transition: 0.25s ease;
}


/* ---------- Reset ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}


/* ---------- Layout ---------- */

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.section {
    padding: 50px 0;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 55px;
    text-align: center;
}

.section-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin-bottom: 15px;
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.15;
}

.section-heading p {
    margin-bottom: 0;
    color: var(--text-light);
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(23, 37, 54, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.header-container {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


/* ---------- Logo ---------- */

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    color: var(--white);
    line-height: 1.1;
}

.logo-mark {
    width: 42px;
    height: 50px;
    flex: 0 0 auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.logo-subtitle {
    margin-top: 5px;
    color: #aebdcd;
    font-size: 0.72rem;
    letter-spacing: 0.42em;
}


/* ---------- Navigation ---------- */

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    position: relative;
    padding: 30px 0;
    color: #e8edf2;
    font-size: 0.94rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 20px;
    left: 0;
    height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: #7fc2ff;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}


/* =========================================================
   BOUTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    transition:
        transform var(--transition),
        background var(--transition),
        color var(--transition),
        box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--white);
    background: var(--blue);
    box-shadow: 0 8px 20px rgba(20, 120, 212, 0.22);
}

.btn-primary:hover {
    background: var(--blue-dark);
    box-shadow: 0 12px 25px rgba(20, 120, 212, 0.28);
}

.btn-secondary {
    color: var(--navy);
    background: var(--white);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-cv {
    min-height: 44px;
    padding: 10px 18px;
    color: var(--white);
    background: var(--blue);
}

.btn-cv:hover {
    background: var(--blue-dark);
}


/* =========================================================
   HERO / ACCUEIL
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: var(--background);
}

.hero-container {
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 620px;
}

.hero-content {
    width: min(calc(100% - 40px), var(--container));
    min-height: 620px;
    margin-inline: auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
   /* padding: 75px 20px; */
}

.hero-label {
    margin-bottom: 12px;
    color: #748398;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3em;
}

.hero h1 {
    margin-bottom: 8px;
    color: var(--navy);
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin-bottom: 12px;
    color: var(--blue);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.1;
}

.hero-subtitle {
    margin-bottom: 20px;
    color: #617084;
    font-size: 1.15rem;
    font-weight: 500;
}

.hero-text {
    max-width: 570px;
    margin-bottom: 22px;
    color: var(--text);
    font-size: 1rem;
}

.software-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 32px;
    color: #536477;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.software-list span:nth-child(even) {
    color: #b4bec9;
}

.hero .btn {
    width: fit-content;
}

.hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    min-height: 620px;
    overflow: hidden;
}

.hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;

    background: linear-gradient(
        90deg,
        var(--background) 0%,
        rgba(245, 247, 250, 0.98) 18%,
        rgba(245, 247, 250, 0.92) 32%,
        rgba(245, 247, 250, 0.72) 46%,
        rgba(245, 247, 250, 0.38) 60%,
        rgba(245, 247, 250, 0) 72%
    );

    pointer-events: none;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================================
   PROJETS
   ========================================================= */

.projects-section {
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

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

.project-image {
    height: 205px;
    overflow: hidden;
    background: #e9edf2;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.04);
}

.project-content {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.project-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 10px;
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 800;
    box-shadow: 0 6px 15px rgba(23, 37, 54, 0.12);
}

.autocad-icon {
    background: #d52d49;
}

.revit-icon {
    background: #2368bd;
}

.sketchup-icon {
    background: #1976b9;
}

.fusion-icon {
    background: #e86c18;
}

.project-content h3 {
    margin-bottom: 3px;
    color: var(--navy);
    font-size: 1.35rem;
}

.project-type {
    display: block;
    margin-bottom: 15px;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 700;
}

.project-content p {
    margin-bottom: 22px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.project-link,
.text-link {
    margin-top: auto;
    color: var(--blue);
    font-size: 0.9rem;
    font-weight: 700;
    transition: color var(--transition);
}

.project-link:hover,
.text-link:hover {
    color: var(--blue-dark);
}

.projects-more {
    margin-top: 45px;
    padding: 32px;
    text-align: center;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.projects-more h3 {
    margin-bottom: 8px;
    color: var(--navy);
}

.projects-more p {
    max-width: 650px;
    margin: 0 auto 15px;
    color: var(--text-light);
}


/* =========================================================
   COMPÉTENCES
   ========================================================= */

.skills-section {
    background: var(--background);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.skill-card {
    position: relative;
    padding: 32px 28px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(23, 37, 54, 0.04);
}

.skill-number {
    margin-bottom: 18px;
    color: #b7c4d1;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.skill-card h3 {
    margin-bottom: 10px;
    color: var(--navy);
    font-size: 1.3rem;
}

.skill-card > p {
    min-height: 52px;
    margin-bottom: 22px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.skill-card ul {
    display: grid;
    gap: 9px;
}

.skill-card li {
    position: relative;
    padding-left: 18px;
    color: var(--text);
    font-size: 0.88rem;
}

.skill-card li::before {
    content: "";
    position: absolute;
    top: 0.7em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    transform: translateY(-50%);
}


/* =========================================================
   À PROPOS
   ========================================================= */

.about-section {
    background: var(--white);
}

.about-container {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(400px, 1.2fr);
    align-items: center;
    gap: 80px;
}

.about-image {
    overflow: hidden;
    min-height: 430px;
    border-radius: var(--radius);
    background: var(--background);
}

.about-image img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.about-content {
    max-width: 650px;
}

.about-content h2 {
    margin-bottom: 10px;
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.15;
}

.about-intro {
    margin-bottom: 25px;
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 600;
}

.about-content p {
    color: var(--text-light);
}

.formation {
    margin-top: 30px;
    padding: 22px 25px;
    background: var(--background);
    border-left: 4px solid var(--blue);
    border-radius: 0 8px 8px 0;
}

.formation h3 {
    margin-bottom: 8px;
    color: var(--navy);
    font-size: 1rem;
}

.formation p {
    margin-bottom: 4px;
}

.formation p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
    background: var(--navy);
}

.contact-section .section-label {
    color: #69b6ff;
}

.contact-section .section-heading h2 {
    color: var(--white);
}

.contact-section .section-heading p {
    color: #b8c6d5;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 10px;
    color: var(--white);
    background: rgba(20, 120, 212, 0.18);
    font-size: 1.2rem;
}

.contact-label {
    display: block;
    margin-bottom: 2px;
    color: #8fa1b5;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-item a {
    color: var(--white);
    font-size: 0.95rem;
    transition: color var(--transition);
}

.contact-item a:hover {
    color: #69b6ff;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.contact-actions .btn-secondary {
    color: var(--white);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
}

.contact-actions .btn-secondary:hover {
    border-color: #69b6ff;
    color: #69b6ff;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 30px 0;
    color: #aebdcd;
    background: #101c29;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 25px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand strong {
    color: var(--white);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.footer-brand span {
    margin-top: 3px;
    font-size: 0.72rem;
    letter-spacing: 0.3em;
}

.footer-links {
    display: flex;
    gap: 22px;
    font-size: 0.82rem;
}

.footer-links a {
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copy {
    text-align: right;
    font-size: 0.78rem;
}


/* =========================================================
   MENU MOBILE — BOUTON HAMBURGER
   ========================================================= */

.menu-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    border-radius: 2px;
    background: var(--white);
    transition:
        transform var(--transition),
        opacity var(--transition);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   RESPONSIVE — TABLETTE
   ========================================================= */

@media (max-width: 1050px) {

    .main-nav {
        gap: 18px;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-container {
        width: 100%;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 6vw, 4rem);
    }

    .about-container {
        gap: 45px;
    }
}


/* =========================================================
   RESPONSIVE — PETITE TABLETTE / GRAND MOBILE
   ========================================================= */

@media (max-width: 800px) {

    .container {
        width: min(calc(100% - 30px), var(--container));
    }

    .section {
        padding: 75px 0;
    }

    .site-header {
        position: sticky;
    }

    .header-container {
        position: relative;
        min-height: 70px;
    }

    .logo-mark {
        width: 36px;
        height: 44px;
    }

    .logo-name {
        font-size: 0.95rem;
    }

    .logo-subtitle {
        font-size: 0.62rem;
    }

    /* Bouton hamburger */
    .menu-toggle {
        display: block;
    }

    /* Menu fermé */
    .main-nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        z-index: 1100;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        background: rgba(23, 37, 54, 0.99);
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 12px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition:
            opacity var(--transition),
            transform var(--transition),
            visibility var(--transition);
    }

    /* Menu ouvert */
    .main-nav.menu-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-link {
        display: block !important;
        width: 100%;
        padding: 14px 16px;
        color: #e8edf2;
        font-size: 0.95rem;
        border-radius: 7px;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--white);
        background: rgba(20, 120, 212, 0.14);
    }

    .nav-link::after {
        display: none;
    }

    .btn-cv {
        display: flex !important;
        width: 100%;
        margin-top: 6px;
    }

    /* Évite le défilement de la page lorsque le menu est ouvert */
    body.menu-is-open {
        overflow: hidden;
    }

    .hero-container {
        min-height: auto;
        display: flex;
        flex-direction: column;
    }

    .hero-content {
        width: min(calc(100% - 30px), var(--container));
        min-height: 620px;
        padding: 75px 0 55px;
    }

    .hero-image {
        position: absolute;
        min-height: 620px;
    }

    .hero-image::before {
        background: linear-gradient(
            180deg,
            var(--background) 0%,
            rgba(245, 247, 250, 0) 25%
        );
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 520px;
        margin: 0 auto;
        width: 100%;
        min-height: 360px;
    }

    .about-image img {
        min-height: 360px;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-copy {
        text-align: center;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 560px) {

    html {
        scroll-padding-top: 70px;
    }

    .container {
        width: min(calc(100% - 24px), var(--container));
    }

    .section {
        padding: 60px 0;
    }

    .header-container {
        min-height: 64px;
    }

    .logo-mark {
        width: 31px;
        height: 38px;
    }

    .logo-name {
        font-size: 0.78rem;
    }

    .logo-subtitle {
        margin-top: 3px;
        font-size: 0.5rem;
        letter-spacing: 0.28em;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }

    .main-nav {
        top: calc(100% + 6px);
    }

    .nav-link {
        padding: 13px 14px;
        font-size: 0.9rem;
    }

    .hero-content {
        width: min(calc(100% - 24px), var(--container));
        min-height: 560px;
        padding: 55px 0 45px;
    }

    .hero-label {
        font-size: 0.75rem;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 14vw, 3.7rem);
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-text {
        font-size: 0.92rem;
    }

    .software-list {
        gap: 6px;
        font-size: 0.7rem;
    }

    .hero .btn {
        width: 100%;
    }

    .hero-image {
        min-height: 280px;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 220px;
    }

    .skill-card > p {
        min-height: auto;
    }

    .about-image,
    .about-image img {
        min-height: 300px;
    }

    .contact-actions {
        flex-direction: column;
    }

    .contact-actions .btn {
        width: 100%;
    }

    .contact-item {
        width: 100%;
        max-width: 340px;
    }

    .footer-links {
        gap: 12px;
        font-size: 0.76rem;
    }
}


/* =========================================================
   ACCESSIBILITÉ / MOUVEMENT RÉDUIT
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================================================
   SÉLECTION DE TEXTE
   ========================================================= */

::selection {
    color: var(--white);
    background: var(--blue);
}
