/**************************************** VAR ****************************************/

:root {
    --font-weight-menu: 400;
    --font-size-menu: 1.5em;
    --letter-space-menu: 0.1em;
    --txt-family-menu: 'Lato', sans-serif;
    --txt-family: 'Roboto', sans-serif;
    --txt-size: 3em;
    --txt-color-1: #ffffff;
    --txt-color-2: #444;
    --hover-color: #ffffff;
    --hover-txt-color: #444;
}

/**************************************** TOOLS ****************************************/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html { 
    overflow-x: hidden;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    background-color: #f7f5f0;
}

header {
    background-image: url('../image/background.jpg');
    background-position: top left;
    background-repeat: no-repeat;
    background-size: 100vw auto;
    padding-bottom: 3rem;
    }

main {
    width: 100vw;
    margin: 0 auto;
    background-image: url('../image/body.jpg');
    background-position: center 40%;
    background-repeat: no-repeat;
    background-size: cover;
    padding-top: 15rem;
    padding-bottom: 5rem;
}

section {
    scroll-margin-top: 10rem;
}
  
.body-container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    display: grid;
    gap: 4rem;
}  

/**************************************** GENERALITIES ****************************************/

p {
    color: var(--txt-color-1);
    font-family: var(--txt-family);
    font-size: var(--txt-size)
}

h1 {
    font-size: 6em;
    font-family: var(--txt-family-menu);
    color: var(--txt-color-1);
    padding: 2em 7em 1em 7em;
    font-weight: 1;
    user-select: none;
}

h2 {
    font-size: 4em;
    font-family: var(--txt-family-menu);
    font-weight: 400;
    color: var(--txt-color-1);
    padding-bottom: 1.5em;
    padding-top: 1em;
    margin-bottom: 1em;
    text-align: center;
    user-select: none;
}

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

/**************************************** HEADER ****************************************/

.banner {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    user-select: none;
}

.container {
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 12rem;
    user-select: none;
}

.menu ul {
    display: flex;
    gap: 7rem;
    list-style: none;
}

.menu a {
    text-decoration: none;
    color: var(--txt-color-1);
    text-transform: uppercase;
    font-family: var(--txt-family-menu);
    font-weight: var(--font-weight-menu);
    font-size: var(--font-size-menu);
    letter-spacing: var(--letter-space-menu);
    transition: 0.3s ease, color 0.3s ease, padding 0.3s ease;
    cursor: pointer;
    user-select: none;
    border-radius: 3rem;
}

.menu a:hover {
    background-color: var(--hover-color);
    padding: 1.5em;
    color: var(--hover-txt-color);
}

.menu.scrolled {
    position: fixed;
    top: 0;
    left: 50%;
    width: 100vw;
    display: flex;
    justify-content: center;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 3rem 3rem;
    z-index: 1000;
    transition: all 0.5s ease;
}

.menu {
    transition: all 0.5s ease;
}

/**************************************** FOOTER ****************************************/

.footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #000000ed;
    padding: 3rem;
    color: white;
    flex-wrap: wrap;
    user-select: none;
  }
  
  .footer-left {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
  }
  
  .footer-logo {
    width: 8rem;
    height: auto;
  }
  
  .footer-texts p {
    margin: 0.3rem 0;
  }
  
  .footer-right {
    max-width: 400px;
  }
  
  .footer-right ul {
    padding-top: 1rem;
    font-size: 1.2em;
  }

/**************************************** SEPARATOR ****************************************/

.separator * {
    padding: 1rem;
    margin-right: 15rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-size: 1.2rem;
    color: #444 !important;
    width: 100%;
    user-select: none ;
}

.separator div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.separator p {
    margin: 1rem;
    margin-top: 2em;
    margin-bottom: 2em;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
}


/**************************************** PRESENTATION ****************************************/

.presentation { 
    position: relative;
    background-image: url('../image/waves.png');
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: auto 125px;
    animation: background-wave-animation-bottom 30s linear infinite;
    padding-bottom: 12rem;
    min-height: 30rem;
}

.presentation::after { 
    content: "";
    position: absolute;
    bottom: -80px; /* dépassement vers le bas */
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(
        to bottom,
        rgb(96, 129, 143) 0%, /* couleur claire en haut */
        rgb(72, 100, 115) 40%, /* transition douce */
        rgba(40, 70, 80, 0.692) 70%, /* couleur plus foncée */
        rgba(6, 40, 43, 0.089) 100% /* couleur foncée avec transparence en bas */
    );
    pointer-events: none;
    z-index: 1;
}

@keyframes background-wave-animation-bottom {
    0% {
        background-position: 0 bottom;
    }
    100% {
        background-position: 100% bottom;
    }
}

.presentation > div {
    display: flex;
    flex-direction: row-reverse;
    gap: 2rem;
    width: 100%;
    margin-right: 60rem;
}

.presentation > div > div {
    width: 50%;
}

.presentation p:not(.salut) {
    margin-top: -1rem;
    margin-bottom: -1rem;
}

.presentation img {
    width: 20em;
    border-radius: 50%;
    margin-top: 2rem;
    margin-bottom: 2rem;
    height: auto;
    user-select: none;
}

.image-presentation {
    animation: rebound 4s ease-in-out infinite;
}

@keyframes rebound {
    0%   { transform: translateY(50px); }
    3%   { transform: translateY(60px); }
    6%   { transform: translateY(70px); }
    9%   { transform: translateY(80px); }
    12%  { transform: translateY(90px); }
    15%  { transform: translateY(95px); }
    18%  { transform: translateY(100px); }
    21%  { transform: translateY(105px); }
    24%  { transform: translateY(110px); }
    27%  { transform: translateY(105px); }
    30%  { transform: translateY(100px); }
    33%  { transform: translateY(95px); }
    36%  { transform: translateY(90px); }
    39%  { transform: translateY(80px); }
    42%  { transform: translateY(70px); }
    45%  { transform: translateY(60px); }
    48%  { transform: translateY(55px); }
    51%  { transform: translateY(50px); }
    54%  { transform: translateY(55px); }
    57%  { transform: translateY(60px); }
    60%  { transform: translateY(70px); }
    63%  { transform: translateY(80px); }
    66%  { transform: translateY(90px); }
    69%  { transform: translateY(95px); }
    72%  { transform: translateY(100px); }
    75%  { transform: translateY(105px); }
    78%  { transform: translateY(110px); }
    81%  { transform: translateY(105px); }
    84%  { transform: translateY(100px); }
    87%  { transform: translateY(95px); }
    90%  { transform: translateY(90px); }
    93%  { transform: translateY(80px); }
    96%  { transform: translateY(70px); }
    100% { transform: translateY(50px); }
}

.salut {
    font-size: 2em;
}

/**************************************** GALERIE ****************************************/

.grid {
    display: grid; 
  
    grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
     
    gap: 5rem;
    height: 100%;
    padding-bottom: 10rem;
    user-select: none;
     
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    user-select: none !important;
    transition: transform 0.3s ease;
    border: 3px solid white;
    border-radius: 10px;
}

.grid-item img:hover {
    transform: scale(1.05);
    box-shadow:15px 15px 15px rgba(0, 0, 0, 0.6);
}
  
#item-0 { 
    grid-row-start: 1;
    grid-column-start: 1;

    grid-row-end: 3;
    grid-column-end: 2;
}

#item-1 {
    grid-row-start: 3;
    grid-column-start: 1;

    grid-row-end: 5;
    grid-column-end: 2;    
}

#item-2 {
    grid-row-start: 2;
    grid-column-start: 2;

    grid-row-end: 4;
    grid-column-end: 3; 
}

#item-3 {
    grid-row-start: 1;
    grid-column-start: 3;

    grid-row-end: 3;
    grid-column-end: 4;
}

#item-4 {
    grid-row-start: 3;
    grid-column-start: 3;

    grid-row-end: 5;
    grid-column-end: 4;
}

#item-5 {
    grid-row-start: 4;
    grid-column-start: 2;

    grid-row-end: 6;
    grid-column-end: 3;
}

#item-6 {
    grid-row-start: 2;
    grid-column-start: 4;

    grid-row-end: 4;
    grid-column-end: 5;
}

#item-7 {
    grid-row-start: 1;
    grid-column-start: 5;

    grid-row-end: 3;
    grid-column-end: 6;  
}

#item-8 {
    grid-row-start: 3;
    grid-column-start: 5;

    grid-row-end: 5;
    grid-column-end: 6;
}

#item-9 {
    grid-row-start: 4;
    grid-column-start: 4;

    grid-row-end: 6;
    grid-column-end: 5;
    
}

#item-10 {
    grid-row-start: 5;
    grid-column-start: 1;

    grid-row-end: 7;
    grid-column-end: 2;
}

#item-11 {
    grid-row-start: 5;
    grid-column-start: 3;

    grid-row-end: 7;
    grid-column-end: 4;
}

#item-12 {
    grid-row-start: 5;
    grid-column-start: 5;

    grid-row-end: 7;
    grid-column-end: 6;
}

/**************************************** ZOOM PICTURE ****************************************/

/* Modifications dans les styles */
.modal {
    display: none; /* Définir la modale comme invisible par défaut */
    opacity: 0; /* Modale invisible au départ */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    overflow: auto;
    user-select: none;
    transition: opacity 0.3s ease; /* Transition sur opacité seulement */
}

.modal.show {
    display: flex; /* Afficher la modale quand on ajoute la classe .show */
    opacity: 1; /* Rendre l'opacité à 1 pour la faire apparaître */
}

.modal-content {
    position: relative;
}

.modal-content img {
    max-width: 80vw;  /* Limiter la largeur à 80% de la largeur de la fenêtre */
    max-height: 80vh; /* Limiter la hauteur à 80% de la hauteur de la fenêtre */
    width: 100%; /* L'image prend toute la largeur de son conteneur */
    height: auto; /* Garder la proportion de l'image */
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    object-fit: contain; /* Conserve les proportions sans déformation */
    margin: 0 auto; /* Centrer l'image */
    position: relative;
    display: inline-block;
    max-width: 90vw; /* Limite la largeur de l'image à 90% de la fenêtre pour qu'elle ne soit pas trop grande */
    max-height: 80vh; /* Limite la hauteur de l'image */
    margin: auto; /* Centrer la modale */
}

/* Position fixe pour la croix en dehors de l'image */
.close {
    position: absolute;
    top: 20%; /* À 10px du bord supérieur */
    right: -50%; /* À 10px du bord droit */
    background: none;
    border: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 1000; /* S'assurer que la croix est au-dessus de l'image */
    transition: color 0.3s;
}

.close:hover {
    color: #aaa;
}

@keyframes zoomIn {
    from { transform: scale(0.7); }
    to { transform: scale(1); }
}




/**************************************** FORMULAIRE ****************************************/

.contacter-padding {
    padding-bottom: 1rem;
}

form {
    background-color: #ffffff00;
    padding-top: 5rem;
}

.flex {
    display: flex;
    justify-content: space-between;
  }

.col {
    flex-basis: 48%;
  }

.toolbar {
	padding: 1em 2em;
	text-align: left;
}

input {
	margin-bottom: 1em;
}

label {
    display: block;
  }

input[type="text"],
input[type="email"],
textarea {
	display: block;
    width: 100%;
	padding: 0.65em 1em;
	font-size: 1.6rem;
	color: #333;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 0.5em;
}
textarea {
	width: 100%;
	min-height: 10em;
    font-family: var(--txt-family);
}

.button {
	display: inline-block;
    margin-left: 0;
	padding: 0.8em 2em;
	font-size: 1.6rem;
	color: #ffffff;
	background-color: #444;
	border: 2px solid #444;
	border-radius: 0.5em;
	cursor: pointer;
    user-select: none;
}

.button:hover {
	text-decoration: none;
	color: #444;
	background-color: #ffffff;
}

/**************************************** BACK TO TOP ****************************************/

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(6px);
    outline: none;
}

.back-to-top:focus {
    outline: none;
}
  
.back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateX(-50%) scale(1.2);
}
  
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/**************************************** LOADER ****************************************/

/* Modal avec effet blur */
.loader-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px); /* Flou en arrière-plan */
  background-color: rgba(255, 255, 255, 0.5); /* Fond légèrement transparent */
  width: 100%;
  height: 100%;
  overflow: hidden; /* On empêche les débordements */
  user-select: none;
}

/* Loader : centrer l'image sans fond autour */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto; /* Ajuste la largeur de façon fluide selon le contenu */
  height: auto; /* Même pour la hauteur */
}

/* Image du loader sans fond */
.loader {
  width: 200px; /* Taille de l'image du loader */
  height: auto;
  max-width: 100%; /* L'image ne dépasse pas */
  background: none; /* Pas de fond */
  border: none; /* Pas de bordure */
  display: block; /* On évite les espaces autour de l'image */
  animation: loader-wave-animation 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
}

/* Animation du loader */
@keyframes loader-wave-animation {
  0% { transform: translateY(0) rotate(0deg); }
  12.5% { transform: translateY(5px) rotate(7.5deg); }
  25% { transform: translateY(10px) rotate(15deg); }
  37.5% { transform: translateY(5px) rotate(7.5deg); }
  50% { transform: translateY(0) rotate(0deg); }
  62.5% { transform: translateY(-5px) rotate(-7.5deg); }
  75% { transform: translateY(-10px) rotate(-15deg); }
  87.5% { transform: translateY(-5px) rotate(-7.5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
  

/*************************************************************************************/
/*********************************MEDIA QUERIES MOBILE********************************/
/*************************************************************************************/

@media screen and (max-width: 768px) {

    /* Texte général */
    html {
        font-size: 55%;
        scroll-behavior: smooth;
    }

    body, html {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
      }
    
    body.modal-open .grid-item img {
    pointer-events: none;
    }
  

    h1 {
        font-size: 3.5em;
        padding: 2em 2em 1em 2em;
        text-align: center;
    }

    h2 {
        font-size: 3em;
        padding: 1em 0;
        margin-bottom: 0;
    }

    p {
        font-size: 1.6em;
    }

    /* Header */
    .banner {
        flex-direction: column;
        align-items: center;
        padding: 2rem 1rem;
    }

    .container {
        flex-direction: column;
        gap: 2rem;
    }

    .logo {
        width: 10rem;
    }

    /* Menu horizontal sur mobile */
    .menu ul {
        display: flex;
        flex-direction: row;           /* ➤ Disposition horizontale */
        justify-content: center;       /* ➤ Centré horizontalement */
        gap: 1.5rem;                    /* ➤ Espacement entre les éléments */
        flex-wrap: wrap;               /* ➤ Enroule les éléments si nécessaire */
        padding: 0;
    }

    .menu a {
        font-size: 1.4em;              /* ➤ Réduction de la taille de la police */
        padding: 0.5rem 1rem;
        white-space: nowrap;           /* ➤ Évite la coupure de texte */
    }

    .menu.scrolled {
        left: 0;
        transform: none;
        justify-content: center;
        padding: 2rem;
    }

    /* Section Présentation */

    .presentation > div {
        flex-direction: column;
        margin-right: 0; /* Supprime la marge énorme sur mobile */
    }

    .presentation > div > div {
        width: 100%;
    } 
    .presentation p {
        transform: translateY(-40px);
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .text-content {
    order: 1; /* texte au-dessus */
    }

    .image-presentation {
        width: 90%;
        max-width: 300px;
        height: auto;
        border-radius: 2rem;
        margin-top: 2rem;
        margin-bottom: 0;
        padding-bottom: 0;
        animation: rebound 4s ease-in-out infinite;
        will-change: transform;
        order: 2; /* image en dessous */
    }

    .salut {
        text-align: center;
        margin-bottom: 0 !important;
        padding-bottom: 1rem;

    }

    /* Galerie */
    @media (max-width: 768px) {
        .grid {
          grid-template-columns: repeat(3, 1fr);
          grid-auto-rows: auto;
          gap: 2rem;
          margin-bottom: -35rem;
        }
      
        .grid-item {
          grid-column: auto !important;
          grid-row: auto !important;
        }
      }

    .grid img {
        width: 100%;
        height: auto;
        object-fit: cover;
      }
      
    .grid-item img {
        width: 100%;
        border-radius: 1rem;
        cursor: pointer;
        transition: transform 0.3s ease; /* Effet zoom sur l'image */
    }

    .grid-item img:hover {
        transform: scale(1.05); /* Zoom léger au survol */
    }

    /* Modal style */
    #overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.6); /* ou transparent si tu veux juste bloquer */
        z-index: 999; /* suffisamment haut pour couvrir tout */
        display: none; /* caché par défaut */
        pointer-events: auto;
    }
    
    #imageModal {
        z-index: 1000; /* au-dessus de l'overlay */
    }
    
    body.modal-open {
        overflow: hidden; /* empêche le scroll */
    }
    

.modal {
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.modal-content {
    position: relative;
    max-width: 65%;
    max-height: 65%;
    pointer-events: auto;
    border-radius: 10px;
}

.close {
    position: fixed;
    top: 50%;
    right: 2rem;
    font-size: 3rem;
    color: white;
    z-index: 9999;
    cursor: pointer;
    pointer-events: auto;
}


.disable-interaction {
    overflow: hidden; /* Empêche le scroll */
    pointer-events: none; /* Bloque les clics */
}

.disable-interaction *:not(#imageModal):not(#overlay):not(.close) {
    pointer-events: none !important; /* Empêche les clics sauf sur le modal et overlay */
}
    
    /* Formulaire */

    #contact {
        scroll-margin-top: 200px; /* adapte selon ta nav ou ton header */
    }

    .flex {
        flex-direction: column;
        gap: 2rem;
    }

    .col input,
    .col textarea {
        width: 100%;
        font-size: 1.4em;
        padding: 1rem;
    }

    textarea {
        min-height: 150px;
    }

    .toolbar {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
    }

    .button {
        font-size: 1.6em;
        padding: 1rem 2rem;
    }

    /* Footer */
    .footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 2rem;
    }

    .footer-left,
    .footer-right {
        align-items: center;
    }

    .footer-logo {
        width: 8rem;
        margin-bottom: 1rem;
    }

    .footer-texts p,
    .footer-right p,
    .footer-right ul {
        font-size: 1.2em;
    }
}

/* Média queries pour très petits écrans */
@media screen and (max-width: 480px) {

    /* Réduction pour très petits écrans */
    .menu ul {
        gap: 1rem;                    /* ➤ Moins d'espace entre les éléments */
    }

    .menu a {
        font-size: 1em;                /* ➤ Réduction encore plus petite */
    }

    .logo {
        width: 6rem;                  /* ➤ Logo encore plus petit sur petits écrans */
    }
}
