@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

:root {
  --bg-color: #081b29;
  --main-color: #00abf0;
  --text-color: #333;
  --second-text-color: #555;
  --white-color: #fff;
  --cover-color: linear-gradient(45deg, #00abf0, #006e9a);
  --pages-color: linear-gradient(90deg, #fff, #ddd);
  --border: .125rem solid #00abf0;
  --box-shadow: 0 0 .6rem rgba(0, 0, 0, .2);
  --dots-color: #006e9a;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
  overflow: hidden;
}

.wrapper {
  position: relative;
  width: 66rem;
  height: 45rem;
  padding: 2rem;
  perspective: 250rem;
  animation: show-animate 2s forwards;
}

@keyframes show-animate {
  0%, 30% {
    opacity: 0;
    transform: rotate(-20deg);
  }
  100% {
    opacity: 1;
    transform: rotate(0deg);
  }
}

.cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--cover-color);
  box-shadow: var(--box-shadow);
  border-top-left-radius: .6rem;
  border-bottom-left-radius: .6rem;
  transform-origin: right;
}

.cover.cover-left {
  z-index: -1;
}

.cover.cover-right {
  z-index: 100;
  transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.cover.cover-right.turn {
  transform: rotateY(180deg);
}

.book {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  perspective: 250rem;
}

.book .book-page {
  position: absolute;
  width: 50%;
  height: 100%;
  background: var(--pages-color);
  box-shadow: 0 0 .6rem rgba(0, 0, 0, .1);
  display: flex;
  padding: 2rem;
}

.book-page.page-left {
  box-shadow: -.6rem .6rem .6rem rgba(0, 0, 0, .1);
}

.profile-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.profile-page img {
  max-width: 180px; 
  border-radius: 50%;
  border: .25rem solid var(--main-color);
  margin-bottom: .8rem;
}

.profile-page h1 {
  font-size: 2.7rem;
  line-height: 1;
  padding-top: .1rem;
}

.profile-page h3 {
  font-size: 1.5rem;
  color: var(--main-color)
}

.profile-page .social-media {
  margin: .6rem 0 .8rem;
}

.profile-page .social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: var(--border);
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--main-color);
  margin: 0 .2rem;
  transition: .5s;
}

.profile-page .social-media a:hover {
  background: var(--main-color);
  color: var(--white-color);
  animation: gelatine 0.5s 1;
}

.profile-page p {
  text-align: justify;
  font-size: 14px; /* Rajouté par moi */
}

.profile-page .btn-box {
  margin-top: 1.2rem;
}

.btn:hover {
  background: transparent;
  color: var(--main-color);
  animation: gelatine 0.5s 1;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 8.5rem;
  height: 3rem;
  background: var(--main-color);
  border: var(--border);
  border-radius: 4rem;
  font-size: 1rem;
  color: var(--white-color);
  font-weight: 500;
  margin: 0 1rem;
  transition: .5s;
}

.btn-box .btn:nth-child(2) {
  background: transparent;
  color: var(--main-color);
}

.btn-box .btn:nth-child(2):hover {
  background: var(--main-color);
  color: var(--white-color);
  animation: gelatine 0.5s 1;
}

/* Du bas jusqu ici tout est complet. 
le haut est a verifier et a completer ce qui manque. Video:31:33 */
.book-page.page-right {
  position: absolute;
  right: 0;
  transform-style: preserve-3d;
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1); /* turn the page with page transistion*/
}

.book-page.page-right.turn {
  transform: rotateY(-180deg);
}

.book-page .page-front, 
.book-page .page-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--pages-color);
  padding: 1.5rem 2rem;
}

.book-page .page-front {
  transform: rotateY(0deg) translateZ(1px);
}

.book-page .page-back {
  transform: rotateY(180deg) translateZ(1px);
}

.title {
  text-align: center;
  margin-bottom: 1rem;
}

.workeduc-box {
  border-left: var(--border);
}

.workeduc-box .workeduc-content {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 1.2rem;
}

.workeduc-box .workeduc-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -0.65rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--main-color);
  border-radius: 50%;
}

.workeduc-content .year {
  color: var(--main-color);
  font-size: 14px; /* Rajouté par moi */
}

.workeduc-content .year i {
  margin-right: .4rem;
}

/* Rajouté par moi */
.workeduc-content .job-details {
  font-size: 13px;
  margin-bottom: .2rem;
  margin-top: 0.3rem;
}

/* Rajouté par moi */
.workeduc-content .skills {
  font-size: 12px; /* Rajouté par moi */
}

li .tasks {
  font-size: 12px;
  margin-bottom: .2rem;
  list-style-position: inside;
}

.number-page {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
}

.next-prev-btn {
  position: absolute;
  bottom: .9rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  font-size: 2rem;
  color: var(--second-text-color);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: .5s;
} */

.next-prev-btn {
  color: var(--main-color);
}

.next-prev-btn.back {
  left: 1.5rem;
}

#social-engagement {
  padding-top: 2.7rem;
}

.language {
  display: flex;
  align-items: center;
}

.language-name {
  width: 120px; /* Largeur fixe pour aligner les points */
  text-align: left;
  font-size: 16px;
}

.dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
}

.dot.filled {
  background-color: #1d72b8;
}
ul {
  margin-left: 2rem;
}

/* ------------------ Contact us ------------------------------------------------- */

.article h1, p {
  margin: 0;
  padding: 0;
}
#font {
  font-size: 2rem;
  font-family: "Dancing Script";
}
.article textarea, input, button {
  line-height: 1.5rem;
  border: 0;
  outline: none;
  font-family: monospace;
  appearance: none;
}
.article textarea, input {
  color: #4e5e72;
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='24'><rect fill='rgb(229, 225, 187)' x='0' y='23' width='10' height='1'/></svg>");
  
}
.article textarea {
  width: 100%;
  height: 8rem;
}
.article input {
  width: 50%;
  margin-bottom: 1rem;
  &[type=text]:invalid, [type=email]:invalid {
    color: #ab391c;
    box-shadow: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='24'><rect fill='rgba(240, 132, 114, 0.5)' x='0' y='23' width='10' height='1'/></svg>");
  }
}
button {
  padding: .25rem .5rem;
  border-radius: 0.25rem;
  background-color: rgba(118, 126, 135, 0.9);
  color: white;
  font-size: 1rem;
  transition: background-color 0.2s;
  &:hover,:focus {
    outline: none;
    background-color: var(--main-color);
    animation: gelatine 0.5s 1;
  }
}

@keyframes gelatine {
  0%,
  100% {
    transform: scale(1, 1);
  }
  25% {
    transform: scale(0.9, 1.1);
  }
  50% {
    transform: scale(1.1, 0.9);
  }
  75% {
    transform: scale(0.95, 1.05);
  }
}

.article input[type=text]:focus,
.article input[type=email]:focus,
.article textarea:focus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='24'><rect fill='rgba(78, 94, 114, 0.3)' x='0' y='23' width='10' height='1'/></svg>");
  outline: none;
}

.letter {
  position: absolute;
  left: 0;
  right: 0;
  top: .5rem;
  width: 30rem;
  margin: auto;
  perspective: 56rem; /* 56cm */
}

.side {
  height: 12rem; /* 12cm */
  background-color: #fcfcf8;
  outline: 1px solid transparent;
  &:nth-of-type(1) {
    padding: 2rem 2rem 0;
    border-radius: 1rem 1rem 0 0;
    box-shadow: inset 0 0.75rem 2rem rgba(229, 225, 187, 0.5);
  }
  &.side:nth-of-type(2) {
    padding: 2rem;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.05), inset 0 -0.57rem 2rem rgba(229, 225, 187, 0.5);
    text-align: right;
  }
}
.envelope {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: auto;
}
.envelope.front {
  width: 10rem;
  height: 6rem;
  border-radius: 0 0 1rem 1rem;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
}
.envelope.front::before, .envelope.front::after {
  position: absolute;
  display: block;
  width: 12rem;
  height: 6rem;
  background-color: #e9dc9d;
  transform: rotate(30deg);
  transform-origin: 0 0;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
  content: '';
}
.envelope.front::after{
  right: 0;
  transform: rotate(-30deg);
  transform-origin: 100% 0;
}
.envelope.back {
  top: -4rem;
  width: 10rem;
  height: 10rem;
  overflow: hidden;
  z-index: -9998;
  opacity: 0;
  transform: translateY(-6rem);
  &::before {
    display: block;
    width: 10rem;
    height: 10rem;
    background-color: #e9dc9d;
    border-radius: 1rem;
    content: '';
    transform: scaleY(0.6) rotate(45deg)
  }
}
.result-message {
  opacity: 0;
  transition: all 0.3s 2s;
  transform: translateY(9rem);
  z-index: -9999;
}
.sent {
  & .letter {
    animation: scaleLetter 1s forwards ease-in /*,
    pushLetter 0.5s 1.33s forwards ease-out*/ ;
  }
  & .side:nth-of-type(1) {
    transform-origin: 0 100%;
    animation: closeLetter 0.66s forwards ease-in;
  }
  & .side:nth-of-type(1) h1, .side:nth-of-type(1) textarea {
    animation: fadeOutText 0.66s forwards linear;
  }
  & button {
    background-color: var(--main-color);
  }
  & .envelope {
    animation: fadeInEnvelope 0.5s 1.33s forwards ease-out;
  }
  & .result-message {
    opacity: 1;
    transform: translateY(12rem);
  }
}
.centered {
  position: absolute;
  /*   left: 8rem;
right: 0;*/
  margin: 1rem auto;
  text-align: center;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@keyframes closeLetter {
   50% {transform: rotateX(-90deg);}
   100% {transform: rotateX(-180deg);}
}
@keyframes fadeOutText {
   49% {opacity: 1;}
   50% {opacity: 0;}
   100% {opacity: 0;}
}
@keyframes fadeInEnvelope {
  0% {opacity: 0; transform: translateY(8rem);}
  /*90% {opacity: 1; transform: translateY(4rem);}*/
  100% {opacity: 1; transform: translateY(4.5rem);}
}
@keyframes scaleLetter {
  66% {transform: translateY(-8rem) scale(0.5, 0.5);}
  75% {transform: translateY(-8rem) scale(0.5, 0.5);}
  90% {transform: translateY(-8rem) scale(0.3, 0.5);}
  97% {transform: translateY(-8rem) scale(0.33, 0.5);}
  100%{transform: translateY(-8rem) scale(0.3, 0.5);}
}
/*-----------------------------------------------------------------------------*/
.back-profile {
  position: absolute;
  bottom: 1.2rem;
  right: 2rem;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: var(--border);
  border-radius: .3rem;
  font-size: 2rem;
  color: var(--main-color);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: .5s;
}
.back-profile:hover{
  background: var(--main-color);
  color: var(--white-color);
}
.back-profile p {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scale(.5);
  font-size: 1rem;
  color: var(--main-color);
  opacity: 0;
  transition: .5s;
}
.back-profile:hover p {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  top: -1.8rem;
}

.title-end {
  margin: 50% 35% 50% 35%;
}

/*------------------ snow ------------------------------------------*/
/* Conteneur principal de la neige */
#snow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 500px;
  overflow: hidden;
  pointer-events: none;
}

/* Style des flocons */
.snowflake {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
}

/* ------------------ Cloud ------------------------------------------------- */
/* Style des nuages */
.cloud {  
  -webkit-animation: clouds 60s infinite linear;
  -moz-animation: clouds 60s infinite linear;
  -ms-animation: clouds 60s infinite linear;
  -o-animation: clouds 60s infinite linear;
  animation: clouds 60s infinite linear;
  border-radius: 10px;
  position: relative;
  margin: 23px 0 0 0;
  width: 54px;
  height: 5px;
  background: #f7e7eb;
}

.cloud.tiny {
  -webkit-transform: scale(0.5);
  -moz-transform: scale(0.5);
  -ms-transform: scale(0.5);
  -o-transform: scale(0.5);
  transform: scale(0.5);
}

.cloud.small {
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  -ms-transform: scale(1);
  -o-transform: scale(1);
  transform: scale(1);
}

.cloud.normal {
  -webkit-transform: scale(2);
  -moz-transform: scale(2);
  -ms-transform: scale(2);
  -o-transform: scale(2);
  transform: scale(2);
}

.cloud.large {
  -webkit-transform: scale(4);
  -moz-transform: scale(4);
  -ms-transform: scale(4);
  -o-transform: scale(4);
  transform: scale(4);
}

.cloud div {
  -webkit-box-shadow: inset -2px -3px 0 0 #f7e7eb;
  -moz-box-shadow: inset -2px -3px 0 0 #f7e7eb;
  box-shadow: inset -2px -3px 0 0 #f7e7eb;
  position: absolute;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  left: -3px;
  bottom: 0;
  background: #fafbf0;
  z-index: 10;
}

.cloud div + div {
  -webkit-transform: scale(1.6, 1.6);
  -moz-transform: scale(1.6, 1.6);
  -ms-transform: scale(1.6, 1.6);
  -o-transform: scale(1.6, 1.6);
  transform: scale(1.6, 1.6);
  margin: 0 0 4px 13px;
  z-index: 9;
}

.cloud div + div + div {
  -webkit-transform: scale(2.4, 2.4);
  -moz-transform: scale(2.4, 2.4);
  -ms-transform: scale(2.4, 2.4);
  -o-transform: scale(2.4, 2.4);
  transform: scale(2.4, 2.4);
  margin: 0 0 9px 32px;
  z-index: 8;
}

.cloud div + div + div + div {
  -webkit-transform: scale(1.3, 1.3);
  -moz-transform: scale(1.3, 1.3);
  -ms-transform: scale(1.3, 1.3);
  -o-transform: scale(1.3, 1.3);
  transform: scale(1.3, 1.3);
  margin: 0 0 2px 50px;
  z-index: 7;
}

@-webkit-keyframes clouds {
  0% { left: -100%; }
  100% { left: 120%; }
}

@-moz-keyframes clouds {
  0% { left: -100%; }
  100% { left: 120%; }
}

@-ms-keyframes clouds {
  0% { left: -100%; }
  100% { left: 120%; }
}

@keyframes clouds {
  0% { left: -100%; }
  100% { left: 120%; }
}

.cloud-1 {
  -webkit-animation-duration: 263s;
  -moz-animation-duration: 263s;
  -ms-animation-duration: 263s;
  -o-animation-duration: 263s;
  animation-duration: 263s;
  margin-left: 20%;
}

.cloud-2 {
  -webkit-animation-duration: 99s;
  -moz-animation-duration: 99s;
  -ms-animation-duration: 99s;
  -o-animation-duration: 99s;
  animation-duration: 99s;
  margin-left: 90%;
}

.cloud-3 {
  -webkit-animation-duration: 142s;
  -moz-animation-duration: 142s;
  -ms-animation-duration: 142s;
  -o-animation-duration: 142s;
  animation-duration: 142s;
  margin-left: 50%;
}

.cloud-4 {
  -webkit-animation-duration: 152s;
  -moz-animation-duration: 152s;
  -ms-animation-duration: 152s;
  -o-animation-duration: 152s;
  animation-duration: 152s;
  margin-left: 43%;
}

.cloud-5 {
  -webkit-animation-duration: 215s;
  -moz-animation-duration: 215s;
  -ms-animation-duration: 215s;
  -o-animation-duration: 215s;
  animation-duration: 215s;
  margin-left: 83%;
}

.cloud-6 {
  -webkit-animation-duration: 139s;
  -moz-animation-duration: 139s;
  -ms-animation-duration: 139s;
  -o-animation-duration: 139s;
  animation-duration: 139s;
  margin-left: 73%;
}

/* ========================
    STYLES MODALE (Alerte)
   ======================== */
dialog {
  /* ----- new ----- */
  display: none;
  left: 41%;
  top: 31%;
  opacity: 0;
  justify-content: center;
  justify-items: center;
  text-align: center;
  translate: 0 25vh;
  transition-property: overlay display opacity;
  transition-duration: 1s;
  transition-behavior: allow-discrete;
/* ----- End ----- */
}
dialog[open] {
  display: block;
  opacity: 1;
  translate: 0 0;

  @starting-style {
    opacity: 0;
    translate: 0 -25vh;
  }
}
dialog::backdrop {
  opacity: 0;
  background-color: #716f6f;
}
dialog[open]::backdrop {
  opacity: 0.75;

  @starting-style {
    opacity: 0;
  }
}

.modal {
    /* Propriétés de positionnement pour le centrage absolu sur tout écran */
    position: fixed; 
    top: 50%;        
    left: 50%;       
    transform: translate(-50%, -50%); /* Décalage de 50% de sa propre taille pour un centrage parfait */
    
    /* Votre style de base */
    padding: 1.5em; /* Légèrement plus grand pour l'esthétique */
    max-width: 90%; /* S'assure de ne pas dépasser l'écran sur mobile */
    width: 350px; /* Largeur fixe pour les grands écrans */
    background-color: #333;
    border-radius: 10px;
    color: var(--white-color);
    border: none; /* Supprime la bordure par défaut de <dialog> */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Ajout d'une ombre pour la profondeur */

    /* Animation/visibilité gérée par le JS */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

/* Arrière-plan (backdrop) semi-transparent lors de l'ouverture de la modale */
.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.7); 
}

/* Style pour l'état ouvert (vous utilisez la classe 'opened' dans votre JS) */
.modal.opened {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1); /* S'assure que le centrage est maintenu */
    pointer-events: auto;
    z-index: 9999;
}

/* Mise en page des éléments internes */
.modal > * {
    margin: 0 auto 0.75rem; /* Centrage des blocs et espacement */
    text-align: center;
}

.modal img {
    max-width: 100px;
    height: auto;
    display: block; /* Nécessaire pour que margin: auto centre l'image */
}

.modal h1.title {
    color: #ee404c;
    margin-top: 0.5rem;
}

.modal p { 
    color: #FFF;
    margin-bottom: 1rem;
}

/* Style du bouton de fermeture */
.modal .close-button {
    /* Assure que le bouton est centré */
    display: inline-block; 
    
    background-color: #ee404c;
    border: none;
    padding: 8px 30px;
    border-radius: 16px;
    text-transform: uppercase;
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .4s;
    margin: 12px auto 0; /* Centrage sous le texte */
}

.modal .close-button:hover {
    opacity: .8;
}

.modal .close-button:active {
    transform: scale(.95); /* Légère réduction pour le feedback tactile */
}

/*----- CSS pour Canva-seasons -----*/
#season-canvas,
#snow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;          /* pleine hauteur de la fenêtre */
  pointer-events: none;
  z-index: 0;             /* sous ton contenu principal */
  transition: opacity 1s ease-in-out;
}

/*---------------------------------------------------*/
