/* ==========================================================================
   Devmultimedia — one page
   ========================================================================== */

:root {
    --navy: #140f3d;
    --navy-deep: #0d0a2a;
    --navy-soft: #1e1857;
    --blue: #1e87f0;
    --blue-dark: #0f6ecd;
    --light: #f7f8fb;
    --muted: #eceef4;
    --text: #1a1a2e;
    --text-soft: #5b5f75;
    --white: #ffffff;
    --border: rgba(255, 255, 255, 0.14);
    --header-h: 68px;
    --radius: 10px;
    --shadow: 0 18px 40px rgba(10, 8, 40, 0.18);
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    margin: 0;
    font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--light);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: "Barlow Condensed", "Barlow", sans-serif;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 .5em;
    letter-spacing: .01em;
}

p {
    margin: 0 0 1em;
}

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

a {
    color: var(--blue);
    text-decoration: none;
    transition: color .2s ease;
}

a:hover,
a:focus-visible {
    color: var(--blue-dark);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--blue);
    color: #fff;
    padding: 10px 18px;
}

.skip-link:focus {
    left: 0;
}

/* --------------------------------------------------------- Header / nav */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: transparent;
    transition: background-color .3s ease, box-shadow .3s ease;
}

.site-header.is-stuck {
    background: rgba(20, 15, 61, .96);
    box-shadow: 0 2px 20px rgba(0, 0, 0, .25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--header-h);
}

.brand {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
}

.brand:hover,
.brand:focus-visible {
    color: #fff;
    text-decoration: none;
    opacity: .85;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 8px 14px;
    color: rgba(255, 255, 255, .82);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
    color: #fff;
    border-bottom-color: var(--blue);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    height: 2px;
    width: 26px;
    background: #fff;
    transition: transform .25s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------- Hero */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--header-h) + 40px) 0 90px;
    color: #fff;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    background: url("../images/hero-home.jpeg") center / cover no-repeat;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 10, 42, .78) 0%, rgba(13, 10, 42, .58) 50%, rgba(13, 10, 42, .85) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.8rem, 9vw, 6rem);
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-bottom: .2em;
}

.hero-baseline {
    font-family: "Barlow Condensed", sans-serif;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    margin: 0 0 .6em;
    color: #fff;
}

.hero-intro {
    max-width: 46ch;
    margin-top: 1.6em;
    font-size: 1.12rem;
    color: rgba(255, 255, 255, .88);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 1.6em;
}

.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 1;
    width: 26px;
    height: 26px;
    margin-left: -13px;
    border-right: 2px solid rgba(255, 255, 255, .8);
    border-bottom: 2px solid rgba(255, 255, 255, .8);
    transform: rotate(45deg);
    animation: bounce 2.2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50%      { transform: rotate(45deg) translate(6px, 6px); }
}

/* --------------------------------------------------------- Buttons */

.btn {
    display: inline-block;
    padding: 12px 26px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.btn:hover,
.btn:focus-visible {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: #fff;
}

.btn-ghost {
    border-color: rgba(255, 255, 255, .7);
    color: #fff;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--navy);
}

.link-button {
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: var(--blue);
}

/* --------------------------------------------------------- Sections */

.section {
    position: relative;
    padding: 90px 0;
    overflow: hidden;
}

.section-light {
    background: var(--light);
    color: var(--text);
}

.section-dark {
    background: var(--navy);
    color: rgba(255, 255, 255, .88);
}

.section-dark h2,
.section-dark h3 {
    color: #fff;
}

.section-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .18;
}

.section-bg > .container {
    position: relative;
    z-index: 1;
}

.section-bg--competences::before {
    background-image: url("../images/bg-competences.jpg");
}

.section-bg--realisations::before {
    background-image: url("../images/bg-realisations.jpg");
    opacity: .1;
}

.section-bg--contact::before {
    background-image: url("../images/bg-contact.jpg");
}

.section-kicker {
    margin: 0;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.1rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    text-transform: uppercase;
    margin-bottom: 1em;
}

/* Titre barré d'une ligne, comme le site d'origine */
.rule-line {
    display: flex;
    align-items: center;
    gap: 18px;
}

.rule-line::after {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: .3;
}

.hero-baseline.rule-line::after {
    max-width: 320px;
}

.lead {
    max-width: 80ch;
    font-size: 1.15rem;
    margin-bottom: 2.2em;
}

/* --------------------------------------------------------- Grilles */

.grid {
    display: grid;
    gap: 28px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

/* --------------------------------------------------------- Cartes */

.card {
    padding: 30px;
    background: var(--navy-soft);
    color: rgba(255, 255, 255, .88);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(10, 8, 40, .28);
}

.card-title {
    position: relative;
    font-size: 1.6rem;
    padding-left: 16px;
    color: #fff;
}

.card-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 4px;
    background: var(--blue);
    border-radius: 2px;
}

.card a {
    color: #7ec0ff;
}

.card-figure {
    margin: 24px 0 0;
    text-align: center;
}

.card-figure img {
    display: inline-block;
    width: 88px;
    height: auto;
}

.check-list {
    margin: 0 0 1em;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: .5em;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .5em;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(-45deg);
}

.check-list-lg li {
    font-size: 1.1rem;
    padding-left: 36px;
}

.check-list-lg li::before {
    width: 16px;
    height: 9px;
    border-width: 3px;
    left: 2px;
}

/* Silhouettes de terminaux (remplace les icônes UIkit d'origine) */
.device-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin: 26px 0 0;
}

.device {
    position: relative;
    display: block;
    background: rgba(255, 255, 255, .1);
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 3px;
}

.device-desktop,
.device-laptop {
    margin-bottom: 8px;
}

/* pied du moniteur et socle du portable */
.device-desktop::after,
.device-laptop::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    height: 6px;
    background: rgba(255, 255, 255, .55);
    border-radius: 0 0 3px 3px;
    transform: translateX(-50%);
}

.device-desktop::after { width: 34px; }
.device-laptop::after  { width: 100%; }

.device-desktop { width: 74px; height: 50px; }
.device-laptop  { width: 56px; height: 36px; }
.device-tablet  { width: 30px; height: 42px; border-radius: 4px; }
.device-phone   { width: 19px; height: 32px; border-radius: 4px; }

/* --------------------------------------------------------- Méthode */

.grid-divided .step + .step {
    border-left: 1px solid rgba(0, 0, 0, .08);
    padding-left: 28px;
}

.step {
    text-align: center;
}

.step img {
    margin: 0 auto 18px;
    max-height: 190px;
    width: auto;
}

.step h3 {
    font-size: 1.5rem;
}

.step p {
    text-align: left;
    color: var(--text-soft);
}

.benefits {
    margin-top: 60px;
    padding: 34px;
    background: var(--navy);
    color: rgba(255, 255, 255, .9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.benefits .check-list {
    margin: 0;
}

/* --------------------------------------------------------- Technologies */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tech-grid a,
.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 10px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: rgba(255, 255, 255, .78);
    font-family: "Barlow Condensed", sans-serif;
    font-size: .95rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    text-align: center;
    transition: background-color .2s ease, transform .2s ease;
}

.tech-grid a:hover,
.tech-grid a:focus-visible {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
    transform: translateY(-3px);
}

/* fond clair : plusieurs logos d'origine sont sombres et transparents */
.tech-grid img {
    width: 72px;
    height: 72px;
    padding: 8px;
    background: #fff;
    border-radius: 12px;
    object-fit: contain;
}

/* --------------------------------------------------------- Réalisations */

.works {
    gap: 32px;
}

.work {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(10, 8, 40, .1);
    transition: transform .25s ease, box-shadow .25s ease;
}

.work:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(10, 8, 40, .18);
}

.work-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--muted);
    overflow: hidden;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .5s ease;
}

.work:hover .work-thumb img {
    transform: scale(1.04);
}

.work-body {
    position: relative;
    flex: 1;
    padding: 24px 26px 70px;
}

.work-body h3 {
    font-size: 1.45rem;
    margin-bottom: .25em;
}

.work-meta {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: .6em;
}

.work-body p {
    color: var(--text-soft);
    margin-bottom: .5em;
}

.work-tech {
    position: absolute;
    right: 22px;
    bottom: 20px;
    width: 42px;
    height: 42px;
    object-fit: contain;
    opacity: .85;
}

/* --------------------------------------------------------- Contact */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.contact-card {
    padding: 34px;
    background: rgba(20, 15, 61, .82);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-card h3 {
    font-size: 1.7rem;
}

.contact-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid rgba(255, 255, 255, .25);
}

.contact-role {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.2rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
}

.contact-siret {
    font-size: .95rem;
    color: rgba(255, 255, 255, .6);
    margin: 0;
}

.contact-actions {
    margin: 1.4em 0;
}

.social-list {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    color: #fff;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.social-list a:hover,
.social-list a:focus-visible {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.social-list svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

/* --------------------------------------------------------- Footer */

.site-footer {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, .75);
    padding: 30px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-inner p {
    margin: 0;
}

.footer-brand {
    flex: 1;
    justify-content: center;
    font-family: "Barlow Condensed", sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #fff;
}

.footer-brand::before {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: .3;
}

.footer-legal .link-button {
    color: rgba(255, 255, 255, .75);
}

.footer-legal .link-button:hover {
    color: #fff;
}

/* --------------------------------------------------------- Bouton haut de page */

.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--blue);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(10, 8, 40, .3);
    transition: background-color .2s ease, opacity .3s ease;
}

.to-top:hover {
    background: var(--blue-dark);
}

.to-top[hidden] {
    display: none;
}

.to-top svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* --------------------------------------------------------- Modale */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 7, 30, .8);
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 860px;
    max-height: 86vh;
    overflow-y: auto;
    padding: 40px;
    background: var(--navy);
    color: rgba(255, 255, 255, .85);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.modal-dialog h2 {
    font-size: 2rem;
    text-transform: uppercase;
    color: #fff;
}

.modal-dialog h3 {
    margin-top: 1.4em;
    color: #fff;
}

.modal-dialog .card {
    background: rgba(255, 255, 255, .06);
}

.modal-dialog .card h3 {
    margin-top: 0;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
}

.modal-close:hover {
    opacity: 1;
}

body.no-scroll {
    overflow: hidden;
}

/* --------------------------------------------------------- Apparition au scroll */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------- Responsive */

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .site-header {
        background: rgba(20, 15, 61, .96);
    }

    .site-nav {
        position: absolute;
        inset: var(--header-h) 0 auto 0;
        max-height: 0;
        overflow: hidden;
        background: rgba(20, 15, 61, .98);
        transition: max-height .3s ease;
    }

    .site-nav.is-open {
        max-height: 70vh;
        overflow-y: auto;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 24px 20px;
    }

    .site-nav a {
        padding: 14px 0;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }

    .site-nav a:hover,
    .site-nav a:focus-visible,
    .site-nav a.is-active {
        border-bottom-color: var(--blue);
    }

    .grid-divided .step + .step {
        border-left: 0;
        padding-left: 0;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .section {
        padding: 60px 0;
    }

    .container {
        padding: 0 18px;
    }

    .hero-baseline {
        letter-spacing: .18em;
    }

    .card,
    .contact-card,
    .benefits,
    .modal-dialog {
        padding: 24px;
    }

    .footer-inner {
        justify-content: center;
        text-align: center;
    }

    .footer-brand {
        order: -1;
        flex: 0 0 100%;
        justify-content: center;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 14px;
    }

    .tech-grid img {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}
