/* =======================
   Polices
   ======================= */
@font-face {
    font-family: 'Seravek';
    src: url('fonts/Seravek-Light.woff2') format('woff2'),
         url('fonts/Seravek-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Seravek';
    src: url('fonts/Seravek.woff2') format('woff2'),
         url('fonts/Seravek.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Seravek';
    src: url('fonts/Seravek-Italic.woff2') format('woff2'),
         url('fonts/Seravek-Italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Seravek';
    src: url('fonts/Seravek-Medium.woff2') format('woff2'),
         url('fonts/Seravek-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Seravek';
    src: url('fonts/Seravek-Bold.woff2') format('woff2'),
         url('fonts/Seravek-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Seravek';
    src: url('fonts/Seravek-BoldItalic.woff2') format('woff2'),
         url('fonts/Seravek-BoldItalic.woff') format('woff');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* =======================
   Base
   ======================= */
:root {
    --ink: #1e365a;          /* bleu nuit identique aux pictogrammes */
    --accent: #2f6f7c;       /* bleu-vert des titres et du lien portfolio */
    --paper: #fff;
    --rule: rgba(30, 54, 90, 0.35);
}

html {
    box-sizing: border-box;
    font-size: 16px;
}

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

body {
    margin: 0;
    background-color: var(--paper);
    color: var(--ink);
    font-family: 'Seravek', 'Segoe UI', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.55;
    text-align: center;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover,
a:focus-visible {
    color: var(--accent);
}

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

.page {
    padding: 60px 24px 48px;
}

/* =======================
   Logo
   ======================= */
.masthead {
    margin-bottom: 48px;
}

.logo {
    margin: 0;
    line-height: 0;
}

.logo img {
    width: clamp(175px, 17vw, 240px);
    height: auto;
}

/* =======================
   Texte d’introduction
   ======================= */
/* Coupures de lignes reprises de la maquette PDF.
   Neutralisées quand la place manque : le texte se recompose alors normalement. */
br.lb {
    display: none;
}

@container intro (min-width: 1002px) {
    br.lb {
        display: inline;
    }
}

.intro {
    /* 11% : les coupures du PDF réclament 1002px de large. Ce réglage les tient
       jusque vers 1300px de viewport ; en dessous elles se neutralisent seules. */
    padding: 0 11%;
    container: intro / inline-size;
}

.intro h2 {
    margin: 0 0 1.6em;
    font-size: 1.32rem;
    font-style: italic;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent);
}

.intro p {
    margin: 0 auto 1.5em;
    font-size: 0.94rem;
    font-weight: 300;
    text-wrap: pretty;
}

.intro b {
    font-weight: 700;
}

.intro p.tags {
    margin-top: -1.25em;
    font-weight: 700;
}

.intro p.statement {
    margin-top: 2.4em;
    margin-bottom: 0;
    font-weight: 700;
}

/* =======================
   Missions (pictogrammes)
   ======================= */
.missions {
    margin: 56px 0 0;
}

.missions ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 32px 48px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.missions li {
    flex: 0 1 200px;
}

.missions img {
    height: 111px;
    width: auto;
}

.missions h3 {
    margin: 0.7em 0 0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

/* =======================
   Portfolio
   ======================= */
/* Collé au bas de la fenêtre tant que sa place dans le flux est plus bas,
   puis il s’y dépose de lui-même. Fond opaque : le texte défile dessous. */
.portfolio {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 64px 0 0;
    padding: 16px 0 calc(18px + env(safe-area-inset-bottom, 0px));
    background-color: var(--paper);
}

/* fond blanc sur fond blanc : ne se voit que lorsqu’un contenu défile dessous */
.portfolio::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 26px;
    background: linear-gradient(to top, var(--paper), transparent);
    pointer-events: none;
}

.portfolio-link {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.22rem;
    font-style: italic;
    font-weight: 700;
    color: var(--accent);
    transition: color 0.25s ease;
}

/* Le filet et sa pointe forment un seul tracé : même couleur, même épaisseur,
   aucun intervalle entre les deux. */
.portfolio-link .rule {
    position: relative;
    flex: 1 1 0;
    height: 1px;
    background-color: currentColor;
    opacity: 0.55;
}

.portfolio-link .rule::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transition: transform 0.25s ease;
}

.portfolio-link .rule-right::after {
    right: 0;
    transform: translateY(-50%) rotate(45deg);
}

.portfolio-link .rule-left::after {
    left: 0;
    transform: translateY(-50%) rotate(-135deg);
}

.portfolio-link:hover,
.portfolio-link:focus-visible {
    color: var(--ink);
}

.portfolio-link:hover .rule-right::after,
.portfolio-link:focus-visible .rule-right::after {
    transform: translate(4px, -50%) rotate(45deg);
}

.portfolio-link:hover .rule-left::after,
.portfolio-link:focus-visible .rule-left::after {
    transform: translate(-4px, -50%) rotate(-135deg);
}

/* =======================
   Contact
   ======================= */
.contact {
    margin-top: 44px;
}

.contact p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.contact .instagram {
    display: inline-flex;
    padding: 6px;
    margin-bottom: 6px;
    color: var(--ink);
    transition: color 0.25s ease;
}

.contact .address {
    margin-bottom: 26px;
}

.contact .legal a {
    font-size: 0.78rem;
    color: var(--rule);
}

.contact .legal a:hover,
.contact .legal a:focus-visible {
    color: var(--accent);
}

/* =======================
   Page mentions légales
   ======================= */
.legal-page {
    padding-bottom: 32px;
}

.legal-page .masthead {
    margin-bottom: 36px;
}

.legal-page .logo-link img {
    width: clamp(150px, 13vw, 185px);
    height: auto;
}

.legal-page h1 {
    margin: 0 0 40px;
    font-size: 1.32rem;
    font-style: italic;
    font-weight: 700;
    color: var(--accent);
}

/* un texte juridique se lit mal centré : colonne alignée à gauche */
.legal-body {
    max-width: 68ch;
    margin: 0 auto;
    text-align: left;
}

.legal-body section + section {
    margin-top: 30px;
}

.legal-body h2 {
    margin: 0 0 0.5em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule);
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 700;
    color: var(--ink);
}

.legal-body p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.65;
    text-wrap: pretty;
}

.legal-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-body a:hover,
.legal-body a:focus-visible {
    color: var(--ink);
}

.legal-page .back {
    margin: 44px 0 0;
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 700;
    color: var(--accent);
}

.legal-page .contact {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--rule);
}

/* =======================
   Responsive
   ======================= */
@media (max-width: 680px) {
    .page {
        padding: 36px 18px 34px;
    }

    /* le pourcentage étoufferait le texte sur un petit écran */
    .intro {
        padding: 0;
    }

    /* le logo reprend la largeur laissée libre par les marges */
    .logo img {
        width: min(62vw, 230px);
    }

    .legal-page .logo-link img {
        width: min(48vw, 175px);
    }

    .legal-page h1 {
        margin-bottom: 30px;
        font-size: 1.15rem;
    }

    .legal-body section + section {
        margin-top: 26px;
    }

    .masthead {
        margin-bottom: 30px;
    }

    .intro h2 {
        margin-bottom: 1.4em;
        font-size: 1.1rem;
    }

    .intro p {
        margin-bottom: 1.3em;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .intro p.statement {
        margin-top: 2em;
    }

    /* les trois pictogrammes restent en ligne : empilés, la page doublait de longueur */
    .missions {
        margin-top: 40px;
    }

    .missions ul {
        gap: 10px;
    }

    .missions li {
        flex: 1 1 0;
        min-width: 0;
    }

    .missions img {
        height: 72px;
    }

    .missions h3 {
        margin-top: 0.6em;
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .portfolio {
        margin-top: 40px;
    }

    .portfolio-link {
        gap: 9px;
        font-size: 1rem;
    }

    .contact {
        margin-top: 36px;
    }
}

/* Très petits écrans : les trois libellés ne tiennent plus côte à côte */
@media (max-width: 400px) {
    .missions ul {
        gap: 7px;
    }

    .missions img {
        height: 64px;
    }

    .missions h3 {
        font-size: 0.67rem;
    }

    .portfolio-link {
        font-size: 0.94rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
