/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
/** end reset css**/
body {
  max-width: 1140px;
  margin: auto;
  font-family: "Work Sans";
  font-size: 14px;
  background-color: #fffef8;
}
header {
  display: flex;
  justify-content: space-between;
  margin: 50px 0;
}
section {
  margin: 50px 0;
}

h1 {
  display: flex;
  flex-direction: column;
  font-family: "Syne";
  font-size: 22px;
  font-weight: 800;
  color: #b1663c;
}

h1 > span {
  font-family: "Work Sans";
  font-size: 10px;
  letter-spacing: 0.1em;
}

h2 {
  font-family: "Syne";
  font-weight: 700;
  font-size: 30px;
  color: #1d6154;
}

nav ul {
  display: flex;
  align-items: center;
  list-style-type: none;
}
nav li {
  padding: 0 10px;
  font-size: 1.2em;
}

li:hover {
  color: #b1663c;
}
li a {
  text-decoration: none;
  color: black;
}
li:hover {
  font-weight: 900;
}
#introduction {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 100px;
  gap: 50px;
}

#introduction figure {
  flex: 1;
}
#introduction img {
  display: block;
  margin: auto;
  max-width: 474px;
}

#introduction article {
  flex: 1;
}
#introduction h2 {
  margin-bottom: 1em;
}

#introduction p {
  margin-bottom: 0.5em;
}
#portfolio h2 {
  text-align: center;
  margin-bottom: 1em;
}
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-column-gap: 20px;
  grid-row-gap: 20px;
  margin: 100px;
}

.gallery img {
  width: 100%;
}
#contact {
  width: 50%;
  margin: auto;
}
#contact > * {
  text-align: center;
}
#contact h2 {
  margin-bottom: 20px;
}
#contact form {
  text-align: left;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
}

#contact input,
#contact textarea {
  width: 100%;
  max-width: 379px;
  height: 50px;
  font-size: 1.2em;
  border: none;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.09);
  box-sizing: border-box;
}

#contact label {
  margin: 2em 0 1em 0;
}

#contact textarea {
  height: auto;
}

input[type="submit"] {
  font-family: "Syne";
  font-weight: 700;
  color: white;
  background-color: #1d6154;
  margin: 2em auto;
  width: 180px;
  text-align: center;
  border-radius: 60px;
}

footer nav ul {
  display: flex;
  justify-content: flex-end;
  margin: 2em;
}

.filtres {
  display: flex;
  gap: 10px;
  margin: 50px;
  justify-content: center;
}

.filtres button {
  display: flex;
  border: 1px solid #1d6154;
  justify-content: center;
  align-items: center;
  background-color: white;
  color: #1d6154;
  border-radius: 60px;
  gap: 5px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
}

.filtres button.active {
  background-color: #1d6154;
  color: #fff;
}

/***Formulaire de connexion***/
form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login h2 {
  display: flex;
  justify-content: center;
  margin-bottom: 45px;
  margin-top: 100px;
  font-size: 30px;
}
.login-form input {
  display: flex;
  max-width: 379px;
  width: 100%;
  height: 42px;
  margin-bottom: 20px;
  background-color: white;
  border: none;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.09);
}
.login-form label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #3d3d3d;
  max-width: 379px;
  width: 100%;
}
.login-form button {
  font-family: "Syne";
  border: 1px solid #1d6154;
  background-color: #1d6154;
  border-radius: 60px;
  color: white;
  width: 180px;
  height: 36px;
  margin-top: 35px;
  margin: 20px auto 0 auto;
}
.login a {
  display: flex;
  justify-content: center;
  color: #3d3d3d;
  margin-top: 30px;
}
nav ul li a.active {
  font-weight: 900;
  color: #000;
}
.footer-login {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding-left: 80px;
}
footer nav ul {
  display: flex;
  justify-content: flex-end;
  margin: 2em;
}
.footer-login li {
  font-family: "Work Sans";
  font-size: 12px;
  margin-top: 260px;
}
.messageErreur {
  margin-top: 10px;
  color: red;
  font-weight: bold;
}

/** Bouton Modifier**/
.portfolio-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 30px;
}
.portfolio-header h2 {
  margin: 0;
}
.edit-btn {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border: none;
  background-color: #fffef8;
  font-family: "Work sans";
  font-size: 14px;
  width: 58px;
  height: 16px;
  transform: translateY(-3px);
  cursor: pointer;
}
.edit-projects {
  display: none;
}

/** Bandeau Edition **/
.bandeau-edition {
  display: none;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 59px;
  background-color: black;
  color: white;
  gap: 10px;
  font-family: "Work Sans";
  font-size: 16px;
  z-index: 1000;
}

/*****Modale*****/
.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  box-sizing: border-box;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.hidden {
  display: none;
}
.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  z-index: 2;
}
.modal-content h2 {
  display: flex;
  justify-content: center;
  color: #000;
  font-size: 26px;
  font-family: "Work sans";
  font-weight: 400;
  margin-top: 30px;
}
.modal-content .btnBack {
  position: absolute;
  top: 25px;
  left: 25px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}
.modal-content .btnClose {
  position: absolute;
  top: 25px;
  right: 25px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/******Galerie******/
.container-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}
/* Grille des photos */
.container-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}
.gallery-wrapper {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.container-gallery .modal-gallery-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px 10px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}
.modal-figure {
  position: relative;
  width: 100%;
}
.modal-figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.btn-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  background-color: #000;
  color: white;
  border: none;
  padding: 3px 5px;
  border-radius: 3px;
  cursor: pointer;
  z-index: 2;
  box-shadow: none;
}
.gallery-separator {
  width: 100%;
  height: 2px;
  background-color: #b3b3b3;
  margin-top: 60px;
  margin-bottom: 40px;
}

/*Bouton Ajouter une photo*/
.container-gallery .btnAddPhoto {
  height: 36px;
  padding: 0 45px;
  border-radius: 60px;
  border: none;
  background-color: #1d6154;
  color: white;
  font-family: "Syne";
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
}

/*****Formulaire*****/
.container-form {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.container-form form {
  display: flex;
  flex-direction: column;
  max-width: 420px;
  width: 100%;
  gap: 20px;
  align-items: stretch;
}
.container-form label {
  font-size: 14px;
  font-family: "Work Sans";
}
.container-form select {
  height: 45px;
  border: none;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.09);
  padding: 0 10px;
  font-size: 14px;
  font-family: "Work Sans";
  background-color: white;
  cursor: pointer;
}
.container-form button {
  align-self: center;
  margin-top: 20px;
  height: 36px;
  padding: 0 75px;
  border-radius: 60px;
  border: none;
  background-color: #a3a2a2;
  color: white;
  font-family: "Syne";
  font-size: 14px;
  cursor: pointer;
}
.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto 20px auto;
}
.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #3d3d3d;
  text-align: left;
}
.upload-photo,
.form-group,
.form-separator {
  width: 100%;
}
.form-group input,
.form-group select {
  width: 100%;
  height: 45px;
  padding: 0 10px;
  font-size: 14px;
  font-family: "Work Sans";
  border: none;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.09);
  box-sizing: border-box;
  border-radius: 3px;
  margin-bottom: 18px;
}

.upload-photo {
  position: relative;
  background-color: #e8f1f6;
  height: 170px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: auto;
  margin-bottom: 30px;
  overflow: hidden;
}
.upload-photo i {
  font-size: 60px;
  color: #b9c5cc;
  margin-top: 15px;
}
.btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #cbd6dc;
  color: #306685;
  font-family: "Work Sans";
  font-size: 14px;
  border-radius: 50px;
  cursor: pointer;
  height: 36px;
  max-width: 150px;
  padding: 0 20px;
}
#preview-image {
  display: none;
  max-width: 100%;
  max-height: 170px;
  object-fit: contain;
  border-radius: 3px;
}
.upload-photo input[type="file"] {
  display: none;
}
.upload-info {
  font-size: 10px;
  color: #444;
  margin-bottom: 20px;
}
.error-message {
  color: #d63333;
  font-size: 14px;
  margin-top: 8px;
  display: none;
}
.form-separator {
  height: 2px;
  background-color: #b3b3b3;
}
.container-form input,
.container-form select {
  box-sizing: border-box;
}
