/* =============================== */
/* FONDU PAGE                      */
/* =============================== */

/* FONDU GLOBAL UNIFIÉ */
body {
    opacity: 0;
    transition: opacity 1.2s ease; /* ← plus doux, plus visible */
}

body.visible {
    opacity: 1;
}

body.fadeout {
    opacity: 0;
    transition: opacity 1.2s ease; /* ← même durée */
}


/* =============================== */
/* POLICES INTER                   */
/* =============================== */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Thin.woff2') format('woff2');
  font-weight: 100;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-ExtraLight.woff2') format('woff2');
  font-weight: 200;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
}

/* =============================== */
/* BASE GÉNÉRALE                   */
/* =============================== */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: auto;
}

body {
  color: #222;
  font-family: 'Inter', sans-serif;
  background: #f7f7f7;
  position: relative;
  overflow-x: hidden;
}

/* Neutraliser le padding du main pour cette page */
body.plages-du-nord main {
    padding: 0;
}

/* =============================== */
/* TITRES & TEXTES                 */
/* =============================== */

h1, h2, h3, h4 {
  font-weight: 200;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-align:left;
}

h2 {
    font-size: 36px;
    color: #222;
}

h3 {
    font-size: 32px;
    color: #222;
}

p {
  font-size: 17px;
  line-height: 1.6;
}

/* =============================== */
/* TITRE PRINCIPAL STYLE RENIE     */
/* =============================== */

.titre-section {
    width: 100%;
    padding-top: 170px;
    padding-bottom: 0px;
    box-sizing: border-box;
}

.titre-section .inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.titre-section h1 {
    font-size: 46px;
    font-weight: 200;
    letter-spacing: 0.02em;
    line-height: 1;
    color: #222;
    margin: 0;
    text-align: left;
}

/* =============================== */
/* Bottom de la galerie            */
/* =============================== */

.section-bottom {
    padding: 30px 0 30px 0;
}

/* Conteneur texte aligné comme le portfolio */
.section-bottom .resume {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.titre-section-bottom {
    width: 100%;
    padding-top: 40px;
    padding-bottom: 40px;
}

.titre-section-bottom .inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.titre-section-bottom h1 {
    font-size: 36px;
    font-weight: 200;
    letter-spacing: 0.02em;
    line-height: 1;
    color: #222;
    margin: 0;
    text-align: left;
}

.resume p {
    max-width: 1400px;
    text-align: justify;
    margin: 0 auto;
    padding: 0; /* padding géré par .resume */
    font-size: 18px;
    line-height: 1.7;
    font-weight: 200;
    margin-bottom: 18px;
    color: #222;
}

.resume h3 {
    max-width: 1400px;
    margin: 0 auto 12px auto;
    padding: 0; /* padding géré par .resume */
    font-size: 32px;
    font-weight: 200;
    letter-spacing: 0.02em;
    line-height: 1.7;
    color: #222;
    text-align: left;
}

p.destins {
    text-align: justify;
    font-size: 18px !important;
    line-height: 1.7 !important;
    font-weight: 200 !important;
    color: #222;
}

.retour {
    max-width: 1400px;
    margin: 0 auto 0 auto;
    padding: 0 40px 60px 0;
    text-align: right;
}

.retour-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 6px;
    font-size: 1.3rem;
    color: rgba(0,0,0,0.65);
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 0.25rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.retour-nav:hover {
    background: rgba(255,255,255,1);
    color: rgba(0,0,0,1);
}

.retour-nav .arrow {
    font-size: 1.8rem;
    line-height: 1;
}

.retour-nav .label {
    font-size: 0.95rem;
    letter-spacing: 0.4px;
}

/* =============================== */
/* PORTFOLIO — 3 COLONNES FIXES    */
/* =============================== */

.portfolio .inner {
    max-width: 1400px;              /* harmonisé avec .resume */
    margin: 0 auto 50px auto;
    padding: 0 20px;                /* même padding que .resume */
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 120px;
    row-gap: 140px;
    align-items: start;
}

.portfolio .col {
    display: flex;
    justify-content: center;
    align-items: center;
    height: fit-content;
}

.portfolio .col img {
    width: 300px;
    height: auto;
    display: block;
}

/* =============================== */
/* VOILE RENIE                     */
/* =============================== */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(200, 200, 200, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
    z-index: 0;
}

body.veil-on::before {
    opacity: 1;
}

.portfolio .col {
    position: relative;
    z-index: 1;
}

.portfolio .col img {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: none;
    transform-origin: center center;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition:
        transform 1.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease-out,
        filter 0.4s ease-out,
        box-shadow 0.6s ease-out;
}

.portfolio .col.hovered img {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

.portfolio .col.hovered {
    z-index: 10002;
}

.portfolio .col.hovered img {
    transform: scale(1.04);
    opacity: 1;
    filter: none;
}

.portfolio.veil-active .col:not(.hovered) img {
    opacity: 0.55;
    filter: grayscale(100%);
}

/* =============================== */
/* CAPTION À DROITE DE L’IMAGE     */
/* =============================== */

#lightbox-caption {
    position: absolute;
    isolation: isolate;
    top: calc(50% + 24vh);
    transform: translateY(-50%);
    right: 20px;
    max-width: 320px;
    font-size: 17px;
    font-weight: 200;
    line-height: 1.45;
    padding: 12px 20px 20px 18px;
    color: #666;
    background: rgba(255,255,255,0.8);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 200000;
}

#lightbox.visible #lightbox-caption {
    opacity: 1;
}

/* =============================== */
/* LIGHTBOX                        */
/* =============================== */

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(247, 247, 247, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99999;
}

#lightbox.visible {
    opacity: 1;
    pointer-events: auto;
}

#lightbox img {
    max-width: 80vw;
    max-height: 80vh;
    position: relative;
    z-index: 100000;
}

#lightbox-img {
    opacity: 1;
    transition: opacity 0.4s ease;
}

#lightbox-img.fade-out {
    opacity: 0;
}

#lightbox-img.fade-in {
    opacity: 1;
}

/* En plein écran : cacher le caption */
body.fullscreen-on #lightbox-caption {
    display: none !important;
}

/* =============================== */
/* BOUTONS LIGHTBOX — STYLE EXACT  */
/* =============================== */

.lightbox-nav {
    position: absolute;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.4rem;
    color: rgba(0,0,0,0.45);
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 0.25rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    z-index: 400002;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#lightbox-fullscreen { right: 210px; }
#lightbox-exitfs { right: 210px; display: none; }

#lightbox-prev {
    left: 85px;
}

#lightbox-next {
    right: 85px;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,1);
    color: rgba(0,0,0,1);
}

.lightbox-nav .arrow {
    font-size: 1.8rem;
    line-height: 1;
}

.lightbox-nav .label {
    font-size: 0.95rem;
    letter-spacing: 0.4px;
}

#lightbox-exitfs {
    display: none;
}

body.fullscreen-on #lightbox-fullscreen {
    display: none !important;
}

body.fullscreen-on #lightbox-exitfs {
    display: inline-flex !important;
}

/* BOUTON PLEIN ÉCRAN — ALIGNÉ */

#lightbox-fullscreen {
    position: absolute;
    bottom: 20px;
    right: 210px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.3rem;
    color: rgba(0,0,0,0.45);
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 0.25rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    z-index: 400002;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
}

#lightbox-fullscreen:hover {
    background: rgba(255,255,255,1);
    color: rgba(0,0,0,1);
}

/* =============================== */
/* SOUS-TITRES h3 — TABLETTES/MOBILE */
/* Les h3 (ex. "Destins de femmes",  */
/* titres dans .resume) restaient à  */
/* 32px sur tous les écrans, ce qui  */
/* fait beaucoup de retours à la     */
/* ligne sur mobile pour les titres  */
/* longs. Réduits ici ; encore       */
/* réduits sur mobile ci-dessous.    */
/* =============================== */

@media (max-width: 1199px) {
    .resume h3,
    .titre-section h3 {
        font-size: 28px;
    }
}

/* =============================== */
/* SMARTPHONES (≤600px)            */
/* =============================== */

@media (max-width: 600px) {
    .portfolio .inner {
        grid-template-columns: 1fr;
        padding: 0;
        row-gap: 80px;
    }

    .titre-section {
        width: 100%;
        padding-top: 100px;
        padding-bottom: 20px;text-align: center;
    }

    .titre-section .inner {
        max-width: 100%;
        margin: 0;
        padding: 0 20px;
        box-sizing: border-box;text-align: center;
    }

    .titre-section h1 {
        font-size: 36px;
        letter-spacing: 0.02em;
        line-height: 1.1;
        color: #398717;
        text-align: center;
    }

    .resume h3 {
        font-size: 24px;
    }

	.titre-section .inner h3 {font-size: 24px; text-align: center; }

    /* ============================================= */
    /* DESCRIPTIF AU CLIC SUR MOBILE (fondu enchaîné) */
    /* Conteneur à la taille exacte de l'image (créé  */
    /* par scripts/portefolio-caption.js), avec le    */
    /* voile de descriptif calqué dessus.             */
    /* ============================================= */

    .mobile-caption-wrap {
        position: relative;
        display: inline-block;
        line-height: 0;
    }

    .mobile-caption {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: flex-end;
        padding: 18px;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        font-size: 15px;
        font-weight: 300;
        line-height: 1.5;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.5s ease;
    }

    .mobile-caption-text {
        width: 100%;
        text-align: left;
    }

    .mobile-caption-wrap.caption-visible .mobile-caption {
        opacity: 1;
    }
}

/* =============================== */
/* TABLETTES PETITES (601–900px)   */
/* =============================== */

@media (min-width: 601px) and (max-width: 900px) {
    .portfolio .inner {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 30px;
        row-gap: 80px;
        padding: 0 50px;
    }
}

/* =============================== */
/* TABLETTES MOYENNES (901–1180px) */
/* =============================== */

@media (min-width: 901px) and (max-width: 1180px) {
    .portfolio .inner {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 40px;
        row-gap: 80px;
        padding: 0 60px;
    }
}

/* =============================== */
/* TABLETTES GRANDES (1181–1199px) */
/* Borne haute alignée sur le seuil */
/* du menu desktop (1200px), sinon  */
/* la grille repassait aux valeurs  */
/* desktop avant le seuil du menu.  */
/* =============================== */

@media (min-width: 1181px) and (max-width: 1199px) {
    .portfolio .inner {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 50px;
        row-gap: 100px;
        padding: 0 80px;
    }
}

/* Réactiver le lightbox sur toutes les tablettes */
@media (min-width: 601px) {
    #lightbox {
        display: flex !important;
    }
}

/* Correction écran noir en sortie de fullscreen */
:fullscreen {
    background: #f7f7f7 !important;
}

:-webkit-full-screen {
    background: #f7f7f7 !important;
}

:-moz-full-screen {
    background: #f7f7f7 !important;
}

body.fullscreen-on #lightbox {
    background: #f7f7f7 !important;
}
