/* TYPOGRAPHIE ########################################################################################################################################################*/

* {
    font-family: Montserrat, sans-serif;
    color: #085E41;
}

/* body défini dans STRUCTURE */

h1 {
    font-size: clamp(2rem, 6vw, 4.5rem);
    margin-bottom: 0%;
}

#accueil h2 {
    font-size: clamp(1rem, 3.5vw, 2rem);
    text-align: center;
}

#accueil h1 {
    text-align: center;
}

.projet-details h1,
.projets-tag h1 {
    font-size: clamp(1.8rem, 5vw, 4rem);
}

a {
    text-decoration: none;
    color: black;
}

.vousAvezDesQuestions a {
    font-weight: bold;
}

.menu i {
    color: black;
}

p,
.CV-linkedin a {
    font-size: 120%;
    line-height: 1.3;
}

p a {
    color: #085E41;
}

.lien {
    font-size: small;
    color: grey;
    font-style: italic;
}

.sous-competences ul {
    list-style: none;
    margin-top: 0px;
}

footer,
header {
    text-align: center;
}

footer p {
    color: #085E4170;
    font-size: small;
}

header {
    color: black;
}

.champsObligatoires {
    font-size: small;
    text-align: right;
}

.CV-linkedin a,
.CV-linkedin i,
.linkedincontact {
    color: #085E4170;
}

.CV-linkedin i,
.linkedincontact {
    font-size: 300%;
}

.competence-item span {
    color: #F2F0D8;
    font-weight: bold;
}

.fa-linkedin-in:hover,
.CV-linkedin a:last-child:hover,
.CV-linkedin a:last-child:hover i {
    color: #085E41;
}

.message-flash {
    font-size: medium;
    font-style: italic;
    text-align: center;
}

/* STRUCTURE ########################################################################################################################################################*/

/* Toutes les pages : contenu centré verticalement */
body {
    background-color: #F2F0D8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    margin-left: clamp(16px, 6vw, 100px);
    margin-right: clamp(16px, 6vw, 100px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 16px;
    padding-bottom: 24px;
}

/* Exception : pages avec beaucoup de contenu → pas centré, juste flex pour pousser en bas */
body:has(.liste-projets) main,
body:has(.projets-competence) main,
body:has(.projets-tag) main {
    justify-content: flex-start;
}

/* Pages avec éléments à répartir sur toute la hauteur */
body:has(.aPropos) main,
body:has(.competence-item) main,
body:has(form) main,
body:has(.projet-details) main {
    justify-content: space-between;
    gap: clamp(16px, 3vh, 48px);
}

/* Page À propos : pousser les icônes en bas */
body:has(.CV-linkedin) main {
    justify-content: space-between;
}

.CV-linkedin {
    margin-top: auto;
    padding-bottom: 40px;
    padding-top: 32px;
}

header {
    padding-top: 10px;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.ligne {
    width: calc(100% - 2 * clamp(8px, 5vw, 500px));
    height: 1px;
    background-color: #085E41;
    margin: 10px auto;
}

.menu {
    display: flex;
    justify-content: space-around;
    padding-left: clamp(8px, 5vw, 500px);
    padding-right: clamp(8px, 5vw, 500px);
    flex-wrap: wrap;
    gap: 8px;
}

.aPropos {
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-template-rows: 1fr;
}

.aPropos p {
    margin-top: 40px;
    margin-right: 70px;
    grid-column: span 2 / span 2;
}

.aPropos img {
    grid-column-start: 3;
}

.linkedincontact {
    margin-bottom: 30px;
}

/* FORMULAIRE ########################################################################################################################################################*/

form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px clamp(20px, 6vw, 230px);
}

input,
textarea {
    border-radius: 15px;
    background-color: #085E4130;
    width: 100%;
    border: none;
    margin-top: 6px;
    box-sizing: border-box;
}

input::placeholder,
textarea::placeholder {
    padding-left: 10px;
}

textarea::placeholder {
    padding-top: 7px;
}

input {
    height: 42px;
}

label {
    font-size: 120%;
}

textarea {
    resize: none;
}

.prenom {
    grid-column-start: 1;
    grid-row-start: 2;
}

.message {
    grid-row: span 2 / span 2;
    grid-column-start: 2;
    grid-row-start: 1;
}

.email {
    grid-column-start: 1;
    grid-row-start: 4;
}

.envoyer {
    grid-row-start: 4;
    align-self: end;
}

.captcha {
    grid-column-start: 2;
    grid-row-start: 5;
    justify-self: end;
}

form button,
.btvoirtout {
    border-radius: 20px;
    background-color: #085E41;
    color: #F2F0D8;
    width: 100%;
    height: 42px;
    font-size: 18px;
    border: none;
    cursor: pointer;
}

/* IMAGES ########################################################################################################################################################*/

.photoRonde {
    width: clamp(160px, 28vw, 420px);
    height: clamp(160px, 28vw, 420px);
    border-radius: 100%;
    border: solid clamp(20px, 2.5vw, 42px) #085E41;
    transition: transform 0.3s ease;
}

.photoRonde:hover {
    transform: scale(1.12);
}

.projets img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.projet-item img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
}

/* COMPETENCES ET PROJETS ################################################################################################################################################*/

.competence-details.invisible {
    display: none;
}

.competence-details {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    padding-bottom: 60px;
    flex-wrap: wrap;
}

.competence-details .gauche {
    flex-shrink: 0;
    min-width: 0;
}

.gauche {
    margin-right: clamp(0px, 4vw, 60px);
}

.projets {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-self: flex-start;
    margin-left: auto;   /* pousse les images à droite */
    margin-top: -50px;
    width: clamp(160px, 20vw, 280px);
    flex-shrink: 0;
    flex-grow: 0;
}

.projet-item1,
.projet-item2 {
    margin-bottom: 20px;
}

/* Titre visible sous l'image sur appareils tactiles (pas de survol) */
.projet-titre-touch {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: #085E41;
    margin-top: 6px;
    text-align: center;
}

@media (hover: none) {
    .overlay {
        display: none;
    }
    .projet-titre-touch {
        display: block;
    }
}

.titre::after {
    content: " -";
}

.competence-titre.ouvert {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0%;
}

.competence-titre.ouvert .titre::after {
    content: "";
}

.bouton-competence {
    border-radius: 0px 20px 20px 0px;
    background-color: #085E41;
    color: #F2F0D8;
    font-size: 18px;
    border: none;
    cursor: pointer;
    padding: 5px 8px 5px 5px;
    text-align: left;
    margin-top: 25px;
    margin-bottom: 10px;
    transition: transform 0.6s ease;
    will-change: transform;
    backface-visibility: hidden;
    max-width: 100%;
    word-break: break-word;
}

.bouton-competence:hover {
    transform: scale(1.05);
}

/* Largeur de référence partagée pour description et sous-competences */
:root {
    --competence-width: min(684px, calc(90vw - clamp(16px, 6vw, 100px)));
}

.competence-titre.ouvert .titre,
.competence-titre.ouvert .description {
    border-top-right-radius: 20px;
    background-color: #085E41;
    color: #F2F0D8;
    font-size: 18px;
    border: none;
    cursor: pointer;
    padding: 5px 8px 5px 5px;
    text-align: left;
    display: block;
    box-sizing: border-box;
}

.competence-titre.ouvert .titre {
    margin-top: 20px;
    padding-right: 10px;
}

.competence-titre.ouvert .description {
    width: var(--competence-width);
    padding-right: 10px;
}

.competence-item .sous-competences {
    background-color: #085E4140;
    border-radius: 0px 0px 20px 0px;
    line-height: 300%;
}

.sous-competences {
    display: block;
    padding-right: 15px;
    width: var(--competence-width);
    box-sizing: border-box;
    margin-bottom: 15px;
}

/* Espace entre la jauge et les images */
.gauge-wrap {
    margin-bottom: 40px;
}

.envoyer:hover,
.btvoirtout:hover {
    background-color: #085e4186;
}

.btvoirtout {
    text-align: center;
    align-content: center;
}

.projets-competence,
.liste-projets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7%;
}

.liste-projets {
    margin-top: 30px;
}

/* Overlay caché par défaut */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.imageprojet {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.6s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.imageprojet:hover {
    transform: scale(1.05);
}

.imageprojet a {
    display: block;
}

.imageprojet img {
    display: block;
}

.imageprojet:hover .overlay {
    opacity: 1;
}

/* CAROUSEL ################################################################################################################################################*/

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
    width: min(70%, 100%);
    margin: 0% auto;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background: white;
}

/* ACCUEIL ################################################################################################################################################*/

#accueil {
    margin-left: clamp(-16px, -6vw, -100px);
    margin-right: clamp(-16px, -6vw, -100px);
    gap: 4vw;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

#accueil .square {
    width: 17vw;
    height: 17vw;
    min-width: 100px;
    min-height: 100px;
    max-width: 280px;
    max-height: 280px;
    background: #085E41;
    border-radius: 12px;
    flex-shrink: 0;
    opacity: 0;
    animation: spinIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, fadeBlur 0.9s ease forwards;
    animation-delay: 0s, 2.1s;
}

#accueil h1 {
    font-size: clamp(36px, 8vw, 120px);
    line-height: 1;
    text-align: left;
    margin: 0;
    display: block;
    transform: translateX(-50vw);
    opacity: 0;
    white-space: nowrap;
}

#accueil h2 {
    font-size: clamp(12px, 1.6vw, 26px);
    font-weight: 500;
    color: #085E41AA;
    text-align: left;
    margin-top: 8px;
    transform: translateX(-50vw);
    opacity: 0;
    animation: slideRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 1.4s;
    white-space: nowrap;
}

@keyframes spinIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes fadeBlur {
    0% {
        opacity: 1;
        filter: blur(0px);
    }

    100% {
        opacity: 0.35;
        filter: blur(4px);
    }
}

#accueil .nom-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 4px;
}

#accueil .prenom-txt {
    animation: slideRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.9s;
}

#accueil .nom-txt {
    animation: slideRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 1.15s;
}

@keyframes slideRight {
    0% {
        transform: translateX(-220px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* JAUGES ################################################################################################################################################*/

.gauge-wrap {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gauge-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 14px;
    font-weight: 500;
}

.gauge-track {
    position: relative;
    height: 36px;
    border-radius: 18px;
}

.gauge-2 {
    background: linear-gradient(to right, #D9A38F 50%, #9B5A44 50%);
}

.gauge-3 {
    background: linear-gradient(to right, #D9A38F 33.3%, #C97B63 33.3%, #C97B63 66.6%, #9B5A44 66.6%);
}

.zone-labels {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
}

.zone-lbl {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.cursor-container {
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cursor-triangle {
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 14px solid #111;
}

.cursor-text {
    font-size: 12px;
    font-weight: 500;
    color: #111;
    margin-top: 4px;
    white-space: nowrap;
}

/* TAGS ################################################################################################################################################*/

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 20px;
    justify-content: center;
}

.tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--color-background-secondary, #f5f5f5);
    color: #555;
    border: 0.5px solid #ddd;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
}

.tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

a.tag {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

a.tag:hover {
    opacity: 0.7;
}
/* GRANDS ÉCRANS (≥ 1400px) ################################################################*/

@media (min-width: 1400px) {
    h1 {
        font-size: clamp(5rem, 7vw, 5rem);
    }

    p, .CV-linkedin a, label {
        font-size: 135%;
    }

    /* Carousel plus petit sur grands écrans */
    .carousel {
        width: 55%;
        max-width: 900px;
    }

    /* Espace en bas de la page projets */
    .liste-projets,
    .projets-competence {
        padding-bottom: 80px;
    }
}

/* RESPONSIVE - TABLETTE (≤ 900px) ################################################################*/

@media (max-width: 900px) {

    main {
        margin-left: 32px;
        margin-right: 32px;
    }

    .ligne {
        width: calc(100% - 32px);
    }

    .menu {
        padding-left: 16px;
        padding-right: 16px;
        gap: 12px;
    }

    /* À propos : photo en dessous du texte */
    .aPropos {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .aPropos p {
        margin-right: 0;
        grid-column: 1;
    }

    .aPropos img {
        grid-column-start: 1;
        margin-top: 24px;
    }

    /* Compétences */
    .competence-details {
        flex-direction: column;
        gap: 24px;
    }

    .gauche {
        margin-right: 0;
        width: 100%;
    }

    /* Sur tablette : description et sous-compétences pleine largeur */
    .competence-titre.ouvert .description,
    .sous-competences{
        width: 100%;
        box-sizing: border-box;
    }

    .projets {
        margin-top: 0;
        width: 100%;
        flex-direction: row;
        gap: 16px;
        flex-wrap: wrap;
    }

    .projet-item1,
    .projet-item2 {
        flex: 1;
        min-width: 140px;
    }

    /* Grilles : 2 colonnes */
    .projets-competence,
    .liste-projets {
        grid-template-columns: repeat(2, 1fr);
        gap: 5%;
    }

    /* Formulaire */
    form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .prenom {
        grid-column-start: 1;
        grid-row-start: auto;
    }

    .message {
        grid-column-start: 1;
        grid-row-start: auto;
        grid-row: auto;
    }

    .email {
        grid-column-start: 1;
        grid-row-start: auto;
    }

    .envoyer {
        grid-row-start: auto;
    }

    .captcha {
        grid-column: 1 / -1;
        grid-row-start: auto;
        justify-self: start;
    }

    /* Carousel plus large sur tablette */
    .carousel {
        width: 90%;
    }

    /* Page accueil */
    #accueil h2 {
        white-space: normal;
        font-size: clamp(12px, 2.5vw, 22px);
    }
}

/* RESPONSIVE - MOBILE (≤ 600px) ################################################################*/

@media (max-width: 600px) {

    main {
        margin-left: 16px;
        margin-right: 16px;
    }

    .ligne {
        width: calc(100% - 16px);
    }

    /* Menu : plus compact */
    .menu {
        padding-left: 8px;
        padding-right: 8px;
        gap: 8px;
        font-size: 90%;
    }

    /* Accueil : carré réduit, texte adapté */
    #accueil {
        flex-direction: column;
        min-height: 100svh;
        gap: 24px;
        padding: 40px 16px;
        margin-left: -16px;
        margin-right: -16px;
    }

    #accueil .square {
        width: 80px;
        height: 80px;
        min-width: unset;
        min-height: unset;
    }

    #accueil h1 {
        font-size: clamp(40px, 14vw, 72px);
        white-space: normal;
        text-align: center;
    }

    #accueil h2 {
        font-size: clamp(11px, 3.5vw, 18px);
        text-align: center;
        white-space: normal;
    }

    #accueil .nom-wrapper {
        align-items: center;
    }

    h1 {
        font-size: clamp(1.8rem, 9vw, 3rem);
    }

    p, .CV-linkedin a, label {
        font-size: 95%;
    }

    /* Photo ronde plus petite */
    .photoRonde {
        width: 140px;
        height: 140px;
        border-width: 20px;
    }

    /* À propos */
    .aPropos p {
        margin-top: 20px;
        font-size: 105%;
    }

    p,
    .CV-linkedin a {
        font-size: 105%;
    }

    /* Projets dans compétences : colonne, taille réduite */
    .projets {
        flex-direction: column;
        width: 100%;
    }

    .projet-item1,
    .projet-item2 {
        width: 100%;
    }

    /* Projets pages : 1 colonne */
    .projets-competence,
    .liste-projets {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Carousel pleine largeur */
    .carousel {
        width: 100%;
    }

    /* Icônes linkedin plus petites */
    .CV-linkedin i,
    .linkedincontact {
        font-size: 200%;
    }

    /* Bouton compétence sur toute la largeur */
    .bouton-competence {
        width: calc(100% + 16px);
        border-radius: 0 12px 12px 0;
        font-size: 16px;
    }

    .captcha {
        grid-column: 1 / -1;
        grid-row-start: auto;
        justify-self: start;
        width: 100%;
    }

    /* Jauge */
    .gauge-track {
        height: 30px;
    }

    .zone-lbl {
        font-size: 10px;
    }
}

/* palette
#187D55 vert
#085E41 vert foncé
#A8D991 vert clair
#79BF34 vert fluo moche
#F2F0D8 beige */