:root {
  --ink: #111111;
  --paper: #f6f6fa;
  --check: #ececf4;
  --shadow: 9px;
  --gap: 34px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  line-height: 1.55;
  background-color: var(--paper);
  /* damier discret */

  border-top: 6px solid var(--ink);
  min-height: 100vh;
}
a { color: inherit; }

.wrap { padding: 0 clamp(20px, 3vw, 40px); }

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  padding: 28px 0 8px;
}
header h1 {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
}
nav { display: flex; gap: 22px; font-size: 15px; font-weight: 700; }
nav a { text-decoration: none; border-bottom: 3px solid transparent; }
nav a:hover { border-bottom-color: var(--ink); }

.lead { font-size: 15px; margin: 6px 0 30px; max-width: 520px; }

/* Galerie : colonnes = chaque photo garde son vrai format */
.gallery {
  columns: 4 300px;
  column-gap: var(--gap);
  padding-right: var(--shadow);   /* place pour l'ombre */
  padding-bottom: var(--shadow);
}
.item {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  cursor: zoom-in;
  display: block;
}
.frame {
  border: 4px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow) var(--shadow) 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
  line-height: 0;
}
.item:hover .frame {
  transform: translate(-3px, -3px);
  box-shadow: calc(var(--shadow) + 3px) calc(var(--shadow) + 3px) 0 var(--ink);
}
.frame img {
  display: block;
  width: 100%;
  height: auto;           /* ← respecte le format réel de la photo */
  opacity: 0;
  transition: opacity .4s ease;
}
.frame img.loaded { opacity: 1; }
.item figcaption {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

/* Sections */
section { margin-top: clamp(48px, 8vw, 100px); max-width: 760px; }
.label {
  display: inline-block;
  font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: 3px 10px; margin-bottom: 18px;
}
.about p { font-size: clamp(16px, 2vw, 19px); line-height: 1.7; }
.contact a.mail {
  font-size: clamp(18px, 2.6vw, 26px); font-weight: 700;
  text-decoration: none; border-bottom: 4px solid var(--ink);
}
.contact a.mail:hover { background: var(--ink); color: var(--paper); }
.contact .social { margin-top: 20px; display: flex; gap: 22px; font-weight: 700; }

footer { padding: 80px 0 36px; font-size: 13px; }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(246,246,250,.97);
  display: none; align-items: center; justify-content: center;
}
.lb.open { display: flex; }
.lb img {
  max-width: 88vw; max-height: 78vh; display: block;
  border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink);
  background: var(--ink);
}
.lb .count { position: absolute; top: 22px; left: 26px; font-weight: 700; font-size: 14px; }
.lb .title { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 15px; }
.lb button {
  position: absolute; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); font: inherit; font-weight: 700; font-size: 22px;
  cursor: pointer; width: 46px; height: 46px; line-height: 1;
  box-shadow: 4px 4px 0 var(--ink);
}
.lb button:hover { background: var(--ink); color: var(--paper); }
.lb .close { top: 16px; right: 18px; }
.lb .prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 560px) {
  :root { --shadow: 7px; --gap: 28px; }
  .gallery { columns: 1; }
  nav { gap: 16px; }
}

/* Page contact */
.page-contact section { margin-top: clamp(32px, 6vw, 70px); }
.page-contact .intro { font-size: clamp(16px, 2vw, 19px); line-height: 1.7; max-width: 560px; margin-bottom: 34px; }
nav a.current { border-bottom-color: var(--ink); }

/* Multi-galeries */
nav { flex-wrap: wrap; justify-content: flex-end; }
.contact .intro { font-size: clamp(16px, 2vw, 19px); line-height: 1.7; max-width: 560px; margin-bottom: 34px; }
.lead { margin-top: 6px; }

main { padding-top: 26px; }


/* Mobile : lightbox plus lisible */
.lb {
    background: var(--paper);
}

@media (max-width: 560px) {
    .lb img {
        max-width: 86vw;
        max-height: 66vh;
    }

    .lb .prev, .lb .next {
        top: auto;
        bottom: 70px;
        transform: none;
    }

    .lb .prev {
        left: 20px;
    }

    .lb .next {
        right: 24px;
    }
}

/* Ombre colorée au survol */
.frame { transition: transform .12s ease, box-shadow .25s ease; }
.item:hover .frame {
  box-shadow: calc(var(--shadow) + 3px) calc(var(--shadow) + 3px) 0 #e63946;
}

/* Balayage rouge sur le nom au chargement */
header h1 a {
    background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, #e63946 50%, var(--ink) 60%, var(--ink) 100%);
    background-size: 300% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: balayage 1.6s ease-out .3s 1 forwards;
}

@keyframes balayage {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: 0% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    header h1 a {
        animation: none;
        background: none;
        -webkit-text-fill-color: currentColor;
        color: var(--ink);
    }
}

/* Paragraphes de la page Contact plus rapprochés */
.contact .intro {
    margin-bottom: 8px;
}

    .contact .intro:empty {
        display: none;
    }

.contact a.mail {
    display: inline-block;
    margin-top: 26px;
}


/* Fond en cascade (page Contact), version minimaliste */
.cascade {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    gap: 48px;
    padding: 0 6vw;
    overflow: hidden;
    pointer-events: none;
    opacity: .8;
    filter: grayscale(1);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%);
    mask-image: linear-gradient(to bottom, transparent, #000 20%);
}

.cascade-col {
    flex: 1;
    overflow: hidden;
}

.cascade-track {
    display: flow-root;
    animation: cascade-down linear infinite;
    will-change: transform;
}

    .cascade-track img {
        display: block;
        width: 100%;
        height: auto;
        margin-bottom: 48px;
    }

@keyframes cascade-down {
    from {
        transform: translateY(calc(var(--d, 0px) * -1));
    }

    to {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cascade-track {
        animation: none;
    }
}


/* Ombre des photos moins opaque */
.frame {
    box-shadow: var(--shadow) var(--shadow) 0 rgba(17, 17, 17, .45);
}

.item:hover .frame {
    box-shadow: calc(var(--shadow) + 3px) calc(var(--shadow) + 3px) 0 rgba(17, 17, 17, .45);
}

/* Ombre rouge au survol (la bordure reste noire) */
.frame {
    transition: transform .12s ease, box-shadow .25s ease;
}

.item:hover .frame {
    box-shadow: calc(var(--shadow) + 3px) calc(var(--shadow) + 3px) 0 rgba(230, 57, 70, .55);
}

/* Pas d'ombre sur la photo agrandie */
.lb img {
    box-shadow: none;
}

/* Menu plus visible */
nav {
    font-size: clamp(17px, 1.6vw, 20px);
    gap: 28px;
}

    nav a {
        border-bottom: 4px solid transparent;
        padding-bottom: 2px;
    }

        nav a:hover {
            border-bottom-color: #e63946;
        }

        nav a.current {
            border-bottom-color: #111111;
        }

/* Ligne sous le nom */
header h1 .tagline {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .02em;
    line-height: 1.3;
}
/* Nom et ligne centrés l'un par rapport à l'autre */
header h1 {
    text-align: center;
}

/* Galerie : colonnes de largeur fixe, photos rangées de gauche à droite */
.gallery {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
    columns: auto;
}

.gcol {
    min-width: 0;
}

.gallery {
    justify-content: center;
}

.item:hover .frame {
    box-shadow: calc(var(--shadow) + 3px) calc(var(--shadow) + 3px) 0 var(--hov, rgba(230, 57, 70, .55));
}

/* Téléphone / tablette : flèches en bas de l'écran */
@media (hover: none) {
    .lb .prev, .lb .next {
        top: auto;
        bottom: 26px;
        transform: none;
    }

    .lb .prev {
        left: 22px;
    }

    .lb .next {
        right: 22px;
    }

    .lb .title {
        bottom: 88px;
    }
}

/* ---------- Téléphone : en-tête compact + menu déroulant (3 lignes) ---------- */
.burger {
    display: none;
}

@media (max-width: 560px) {
    header {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: 16px 0 4px;
    }

        header h1 {
            text-align: left;
            font-size: 20px;
            line-height: 1.15;
        }

            header h1 .tagline {
                margin-top: 2px;
                font-size: 12.5px;
                letter-spacing: 0;
            }

    .burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        padding: 0 9px;
        background: var(--paper);
        border: 3px solid var(--ink);
        box-shadow: 4px 4px 0 var(--ink);
        cursor: pointer;
    }

        .burger span {
            display: block;
            height: 3px;
            background: var(--ink);
            transition: transform .2s ease, opacity .2s ease;
        }

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

    header.open .burger span:nth-child(2) {
        opacity: 0;
    }

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

    nav {
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        gap: 0;
        margin-top: 16px;
        background: var(--paper);
        border: 4px solid var(--ink);
        box-shadow: 6px 6px 0 var(--ink);
    }

    header.open nav {
        display: flex;
    }

    nav a {
        text-align: center;
        padding: 13px 0;
        border-bottom: 3px solid var(--ink);
    }

        nav a:last-child {
            border-bottom: 0;
        }

        nav a:hover {
            border-bottom-color: var(--ink);
        }

        nav a.current {
            background: var(--ink);
            color: var(--paper);
        }

    .lead, .contact, footer {
        text-align: center;
    }

        .lead, .contact .intro {
            margin-left: auto;
            margin-right: auto;
        }

        .contact .social {
            justify-content: center;
        }
}

/* ---------- Bouton « remonter en haut » (téléphone) ---------- */
.to-top {
    display: none;
}

@media (max-width: 560px) {
    .to-top {
        display: block;
        position: fixed;
        left: 20px;
        bottom: 22px;
        z-index: 5;
        width: 40px;
        height: 40px;
        padding: 0;
        font: inherit;
        font-size: 0; /* la flèche est dessinée en CSS, mêmes traits que le menu */
        line-height: 1;
        color: var(--ink);
        background: var(--paper);
        border: 3px solid var(--ink);
        box-shadow: 4px 4px 0 var(--ink);
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
        transition: opacity .2s ease, transform .2s ease;
    }

        .to-top.show {
            opacity: 1;
            pointer-events: auto;
            transform: none;
        }

        .to-top::before {
            content: "";
            display: block;
            width: 12px;
            height: 12px;
            margin: 9px auto 0;
            border-left: 3px solid var(--ink);
            border-top: 3px solid var(--ink);
            transform: rotate(45deg);
        }

        .to-top:active {
            background: var(--ink);
        }

            .to-top:active::before {
                border-color: var(--paper);
            }
}