@charset "utf-8";

/* ==========================================================================
   Sommaire
   1. Variables (thème clair / sombre)
   2. Base
   3. Bouton clair / sombre
   4. Header, logo animé, menu
   5. CV
   6. Titres de sections
   7. Galeries et carrousels
   8. Branding / Photoshop
   9. Footer
   10. Mobile
   ========================================================================== */


/* 1. VARIABLES
   -------------------------------------------------------------------------- */

:root {
    /* Boutons : même arrondi partout */
    --radius-btn: 18px;

    /* Palette */
    --creme: #F6F5EC;
    --gris-fonce: #2e2e2e;
    --gris-clair: #F7F7F7;
    --vert: #CCD8C7;
    --camel: #d5c6b2;
    --mauve: #9590AE;

    /* Thème clair (par défaut) */
    --bg: var(--creme);
    --text: var(--gris-fonce);
    --line: var(--gris-fonce);
    --pill-bg: var(--gris-fonce);
    --pill-text: var(--gris-clair);
    --footer-bg: var(--gris-fonce);

    color-scheme: light;
}

/* Thème sombre : fond gris foncé */
[data-bs-theme="dark"] {
    --bg: #232323; /* même couleur partout, footer compris */
    --text: var(--creme);
    --line: var(--creme);
    --pill-bg: var(--creme);
    --pill-text: var(--gris-fonce);
    --footer-bg: var(--bg);

    color-scheme: dark;
}


/* 2. BASE
   -------------------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    overflow-x: hidden;
    background-color: var(--bg);
    color: var(--text);
    font-family: "Source Sans 3", sans-serif;
    transition: background-color .3s ease, color .3s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .3s ease, background-color .3s ease;
}

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

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--mauve);
    outline-offset: 3px;
}

.playfair-display {
    font-family: "Playfair Display", serif;
}

.source-sans {
    font-family: "Source Sans 3", sans-serif;
}


/* 3. BOUTON CLAIR / SOMBRE
   -------------------------------------------------------------------------- */

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 2px solid var(--line);
    border-radius: var(--radius-btn);
    background: transparent;
    color: var(--text);
    font-size: 1.15rem;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.theme-toggle:hover {
    background-color: var(--vert);
    border-color: var(--vert);
    color: var(--gris-fonce);
}

/* Une seule icône à la fois : la lune propose le mode sombre, le soleil le mode clair */
.theme-toggle i {
    grid-area: 1 / 1;
}

.theme-toggle .icon-sun,
[data-bs-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-bs-theme="dark"] .theme-toggle .icon-sun {
    display: inline-block;
}


/* BOUTONS : un seul style (police, poids, arrondi, survol) pour tous
   -------------------------------------------------------------------------- */

.btn-cta,
.btn-voir-plus,
footer .btn-contact a,
.navbar .navbar-nav .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 2px solid var(--pill-bg);
    border-radius: var(--radius-btn);
    background-color: var(--pill-bg);
    color: var(--pill-text);
    font-family: "Source Sans 3", sans-serif;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

/* Boutons d'action : même hauteur et même espacement */
.btn-cta,
.btn-voir-plus,
footer .btn-contact a {
    min-height: 2.75rem;
    padding: .6rem 1.6rem;
}

/* Variante avec contour (ex. CV) */
.btn-cta-vide {
    background-color: transparent;
    border-color: var(--line);
    color: var(--text);
}

footer .btn-contact a {
    border-color: var(--camel);
}

.btn-cta:hover,
.btn-cta:focus-visible,
.btn-voir-plus:hover,
.btn-voir-plus:focus-visible,
footer .btn-contact a:hover,
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
    border-color: var(--vert);
    background-color: var(--vert);
    color: var(--gris-fonce);
}


/* 4. HEADER, LOGO ANIMÉ, MENU
   -------------------------------------------------------------------------- */

header {
    position: relative;
    min-height: 100vh;
    padding: 5rem 1.5rem;
}

/* Le h1 regroupe nom, métier et titre : chaque ligne garde son propre style */
header h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.5;
}

header .prenom,
header .poste {
    margin-bottom: .5rem;
    font-size: 1.25rem;
}

header .prenom {
    font-weight: 600;
}

header .titre {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
}

.containerLogo {
    position: relative;
    height: 381px;
    align-items: center;
}

.logosaray {
    position: relative;
    z-index: 2;
    width: min(280px, 55vw);
}

.wings {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: min(300px, 62vw);
    height: min(300px, 62vw);
    transform: translate(-50%, -50%);
}

.wings img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform-origin: center center;
}

.wings .gauche {
    animation: flapgauche 2s infinite ease-in-out;
}

.wings .droite {
    animation: flapdroite 2s infinite ease-in-out;
}

@keyframes flapgauche {
    0%, 100% { transform: perspective(400px) rotateY(-40deg); }
    50%      { transform: perspective(400px) rotateY(40deg); }
}

@keyframes flapdroite {
    0%, 100% { transform: perspective(400px) rotateY(40deg); }
    50%      { transform: perspective(400px) rotateY(-40deg); }
}

.navbar-nav {
    align-items: center;
}

.navbar-toggler {
    border-color: var(--line);
}

[data-bs-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

/* .navbar .navbar-nav .nav-link : même poids que la règle Bootstrap, chargée avant */
.navbar .navbar-nav .nav-link {
    width: 180px;
    padding: 1.6rem .5rem;
    text-align: center;
}


/* 5. CV
   -------------------------------------------------------------------------- */

.section.cvsaray {
    padding-inline: 2rem;
}

/* 3 colonnes de largeur égale : identité | parcours | compétences */
.cv-grid {
    display: grid;
    gap: 0 4rem;
    max-width: 1300px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .cv-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Tablette : les compétences passent sous les deux premières colonnes, sur deux colonnes */
    .cv-col:last-child {
        grid-column: 1 / -1;
        column-count: 2;
        column-gap: 4rem;
    }
}

@media (min-width: 1100px) {
    .cv-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cv-col:last-child {
        grid-column: auto;
        column-count: auto;
    }
}

.cv-bloc {
    margin-bottom: 2.5rem;
    break-inside: avoid;
}

.cv-profil {
    text-align: left;
}

.cvsaray .photosaraycv {
    width: min(100%, 300px);
    margin: 0 auto 1.5rem;
}

.cvsaray .photosaraycv img:hover {
    transform: scale(1.25);
    transition: 1s ease;
}

.cvsaray h2 {
    break-after: avoid;
    margin-bottom: 1rem;
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.cvsaray h3 {
    margin-top: 1.3rem;
    font-family: "Source Sans 3", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.cvsaray p {
    margin-bottom: .6rem;
    font-family: "Source Sans 3", sans-serif;
}

.cvsaray a:hover {
    color: var(--mauve);
    font-weight: 700;
    transition: .5s ease;
}

.cvsaray .iconosInfos i {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.cvsaray .iconoskills img {
    width: 30px;
}

.cvsaray .iconoskills img:hover {
    opacity: 50%;
}

.dates {
    color: var(--mauve);
    font-weight: 600;
}

/* Bouton « retour en haut » : apparaît quand le menu est sorti de l'écran */
.up {
    position: fixed;
    right: 0;
    bottom: -25px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: right;
    transition: bottom .4s ease, opacity .4s ease;
}

.up.is-visible {
    bottom: 10px;
    opacity: 1;
    pointer-events: auto;
}

.up a:hover {
    color: var(--camel);
}


/* 6. SECTIONS ET TITRES
   -------------------------------------------------------------------------- */

/* Toutes les sections : au moins la hauteur de l'écran, contenu centré */
.section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 5rem 1.5rem;
}

.section-title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
}


/* 7. GALERIES ET CARROUSELS
   -------------------------------------------------------------------------- */

.imagen-contenedor,
.imagen-contenedor-grand {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    border-radius: 20px;
}

.imagen-contenedor img,
.imagen-contenedor-grand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 1s ease;
}

.imagen-contenedor:hover img,
.imagen-contenedor-grand:hover img {
    transform: scale(1.3);
}


/* 8. BRANDING / PHOTOSHOP
   -------------------------------------------------------------------------- */

.sectionBranding {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
}

.sectionBranding .imagen-contenedor,
.sectionBranding .imagen-contenedor-grand {
    background-color: white;
    border-radius: 20px;
    box-shadow: 5px 5px 15px 0 rgba(0, 0, 0, .2);
}

.sectionBranding .imagen-contenedor {
    width: min(400px, 100%);
    height: 300px;
}

.sectionBranding .imagen-contenedor-grand {
    width: min(500px, 100%);
    height: 610px;
}

/* Survol : la photo entière grandit et passe au-dessus des autres, sans être coupée */
.sectionBranding .imagen-contenedor,
.sectionBranding .imagen-contenedor-grand {
    position: relative;
}

.sectionBranding .imagen-contenedor:hover img,
.sectionBranding .imagen-contenedor-grand:hover img {
    transform: none;
}

@media (hover: hover) {
    .sectionBranding .imagen-contenedor,
    .sectionBranding .imagen-contenedor-grand {
        transition: transform .5s ease, box-shadow .5s ease;
    }

    .sectionBranding .imagen-contenedor:hover,
    .sectionBranding .imagen-contenedor-grand:hover,
    .sectionBranding .imagen-contenedor.reveal.is-in:hover,
    .sectionBranding .imagen-contenedor-grand.reveal.is-in:hover {
        z-index: 5;
        transform: scale(1.18);
        box-shadow: 10px 14px 30px 0 rgba(0, 0, 0, .3);
        transition: transform .5s ease, box-shadow .5s ease;
        transition-delay: 0s !important;
    }
}

.sectionBranding .imagen-contenedor.reveal,
.sectionBranding .imagen-contenedor-grand.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.22, .61, .36, 1);
}

.sectionBranding .imagen-contenedor.reveal.is-in,
.sectionBranding .imagen-contenedor-grand.reveal.is-in {
    opacity: 1;
    transform: none;
}

.sectionBranding h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.sectionBranding .parragraphe {
    font-size: 1.25rem;
    font-weight: normal;
    text-align: justify;
}

.sectionBranding a:hover {
    color: var(--vert);
}

.sectionBranding .link a {
    font-size: 1rem;
    font-style: italic;
    font-weight: normal;
}


/* 8b. LOGOS ET ILLUSTRATIONS (CARROUSELS), RETOUCHES, LIGHTBOX
   -------------------------------------------------------------------------- */

/* Les logos et illustrations restent sur fond blanc dans les deux thèmes */
.logo,
.illu {
    padding: 20px;
    border-radius: 20px;
    background-color: white;
}

.owl-carousel .owl-item .logo,
.owl-carousel .owl-item .illu {
    width: 30%;
}

/* Tablette et mobile : vignettes bien plus grandes */
@media (max-width: 992px) {
    .owl-carousel .owl-item .logo,
    .owl-carousel .owl-item .illu {
        width: min(100%, 460px);
    }
}

.owl-carousel .owl-item {
    display: flex;
    justify-content: center;
}

.owl-carousel button.owl-dot {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--line);
    border-radius: 50%;
}

.owl-carousel button.owl-dot.active,
.owl-carousel button.owl-dot:hover {
    background-color: var(--line);
}

.owl-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.owl-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    color: var(--text);
    font-size: 1.5rem;
}

.owl-prev i:hover,
.owl-next i:hover {
    color: var(--camel);
}

/* Retouches : grille */
.grid-retouche {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Retouches : curseur avant / après */
.grid-retouche .is-extra {
    display: none;
}

.grid-retouche.is-open .is-extra {
    display: block;
}

.retouche,
.compare {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.retouche {
    padding: 0;
    border: 0;
    cursor: zoom-in;
}

.retouche img,
.compare img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.retouche img {
    transition: transform .6s ease;
}

.retouche:hover img,
.retouche:focus-visible img {
    transform: scale(1.05);
}

.compare {
    --pos: 50%;
    user-select: none;
}

.compare-apres {
    position: absolute;
    inset: 0;
}

.compare-avant {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 3px;
    background-color: white;
    box-shadow: 0 0 6px rgba(0, 0, 0, .4);
    transform: translateX(-50%);
    pointer-events: none;
}

.compare-handle i {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    color: var(--gris-fonce);
    transform: translate(-50%, -50%);
}

.compare:focus-within .compare-handle i {
    outline: 3px solid var(--mauve);
    outline-offset: 2px;
}

.compare input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
}

.compare-label {
    position: absolute;
    bottom: .75rem;
    padding: .2rem .7rem;
    border-radius: 50px;
    background-color: rgba(0, 0, 0, .6);
    color: white;
    font-size: .8rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    pointer-events: none;
}

.compare-label-avant {
    left: .75rem;
}

.compare-label-apres {
    right: .75rem;
}


/* Image agrandie */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 4rem 1rem;
    background-color: rgba(20, 20, 20, .92);
}

.lightbox.is-open {
    display: grid;
}

.lightbox img {
    width: auto;
    height: auto;
    max-width: min(100%, 1400px);
    max-height: calc(100vh - 8rem);
    border-radius: 12px;
    background-color: white;
    object-fit: contain;
}

.lightbox button {
    position: absolute;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .15);
    color: white;
    font-size: 1.2rem;
    transition: background-color .3s ease;
}

.lightbox button:hover,
.lightbox button:focus-visible {
    background-color: var(--vert);
    color: var(--gris-fonce);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

body.lightbox-open {
    overflow: hidden;
}

/* 9. FOOTER
   -------------------------------------------------------------------------- */

footer {
    padding-top: 4rem;
    border-top: 2px solid var(--line);
    background-color: var(--footer-bg);
    color: white;
}

footer .containerLogo {
    margin-left: auto;
}

footer h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Texte d'accroche : même taille et même police que les textes des projets */
footer h2 + p {
    font-family: "Source Sans 3", sans-serif;
    font-size: 1.25rem;
    font-weight: normal;
    line-height: 1.6;
}

footer .btn-contact a {
    background-color: var(--camel);
    color: var(--gris-fonce);
}


/* 10. MOBILE
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 600px) {
    .theme-toggle {
        width: 2.5rem;
        height: 2.5rem;
    }

    .lightbox-prev {
        left: .4rem;
    }

    .lightbox-next {
        right: .4rem;
    }

    header {
        padding: 3rem 1rem;
    }

    header .titre {
        font-size: 3rem;
    }

    header .prenom,
    header .poste {
        font-size: .9rem;
    }

    .navbar-toggler {
        margin-bottom: 1.5rem;
    }

    .navbar .navbar-nav .nav-link {
        width: 160px;
        padding: .9rem 0;
        font-size: .9rem;
    }

    .section {
        padding: 4rem 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .section-title {
        margin-bottom: 1.5rem;
    }

    .cvsaray h2 {
        font-size: 1.35rem;
    }

    .cvsaray p {
        font-size: .95rem;
        text-align: left;
    }

    .cvsaray .iconoskills {
        justify-content: center;
    }

    .cvsaray .iconoskills img {
        min-width: 30px;
    }

    .sectionBranding .annee {
        font-size: 1.25rem;
    }

    .sectionBranding .imagen-contenedor {
        height: 240px;
        margin: 0 0 1.5rem;
    }

    .sectionBranding .imagen-contenedor-grand {
        height: 420px;
        margin: 0;
    }

    footer {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    footer .containerLogo {
        margin-left: 0;
        margin-bottom: 0;
    }

    footer {
        padding-top: 2.5rem;
    }

    footer h2 {
        font-size: 1.45rem;
    }

    footer .partie1 p,
    footer .partie1 h2 {
        text-align: center;
    }

    footer .partie1 .btn-contact {
        display: flex;
        justify-content: center;
    }

    footer .partie2 {
        flex-direction: column;
        text-align: center;
    }

    .up {
        right: 10px;
        font-size: 1.2rem;
    }
}


/* Respect de « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .wings .gauche,
    .wings .droite {
        animation: none;
    }

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

    body,
    .imagen-contenedor img,
    .imagen-contenedor-grand img {
        transition: none;
    }
}

/* Boutons en haut à droite : contact, CV, puis bouton clair / sombre */
.header-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: .6rem;
    text-transform: none;
}

.header-actions .theme-toggle {
    position: static;
}

/* Mobile : les boutons du haut sont centrés (et passent à la ligne si l'écran est très étroit) */
@media (max-width: 768px) {
    .header-actions {
        left: 0;
        right: 0;
        justify-content: center;
        flex-wrap: wrap;
        padding-inline: 1rem;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: .4rem;
    }

    .header-actions .btn-cta {
        padding-inline: 1rem;
        font-size: .85rem;
    }
}
