html {
  scroll-behavior: smooth;
}
body{
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

:root {
  --bg-color: #fff;
  --text-color: #15202B;
  --box-shadow:4px 2px 15px 0px rgba(87,177,228,0.57);
  /* box-colors */
  --box-color: rgb(202, 220, 231);
}

.dark-theme {
  --bg-color: #15202B;
  --text-color: #fff;


  /* box-colors */
  --box-color:#00263d;

}

/* ---------------------------------main */
main{
  display: flex;
  justify-content: center;
}
#contact{
  width: 60%;
}

form{
  margin-top: 50px;
  background-color:var(--bg-color) ;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow:var(--box-shadow) ;
}

h2 {
  text-align: center;
  color: rgb(87, 177, 228);
  margin: 0 0 20px 0;
  text-shadow: var(--box-shadow);
  font-size: 40px;
}

label {
margin-top: 10px;
color: #57b1e4;
}

.name-lastname, .email-phone{
  display: flex;
  width: 100%;
  gap: 10px;

}

.nom,.lastname, .email, .phone, .subject, .message{
  display: flex;
  flex-direction: column;
  width: 100%;
}



input, textarea, select {
  background-color: var(--bg-color);
  color: var(--text-color);
height: 40px;
padding: 8px;
margin-top: 1px;
border: 2px solid #57b0e472;
border-radius: 4px;
box-sizing: border-box;
outline: none;
}

textarea{
  resize: none;
  height: 100px;
}

.buttons{
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;

}

.button-send {
width: 20%;
padding: 12px;
background-color: #57b1e4;
border: none;
border-radius: 4px;
color: #fff;
font-size: 1rem;
cursor: pointer;
transition: transform .2s; 
  box-shadow: var(--box-shadow);
  box-sizing: border-box;
}
.button-send:hover {
transform: scale(1.05);
}

.button-cancel {
  width: 20%;
  padding: 12px;
  background-color: #7a0000;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .2s; 
  box-shadow:4px 2px 15px 1px #ec5050a1;
}
.button-cancel:hover {
transform: scale(1.05);
}
.error-txt{
  color: #ff0000;
  font-size: 12px;
  text-align: left;
  margin-left: 5px;
display: none;
}

.error{
border-top: 2px rgb(255, 0, 0,0.5) solid;
}


.contact-box{
  margin-top:50px ;
  display: grid;
  grid-template-columns:  1fr 1fr 1fr;
  gap: 10px;
}

.small-box{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: var(--bg-color);
  padding: 15px;
  border-radius: 10px;
  box-shadow: var(--box-shadow) ;
  box-sizing: border-box;
  font-style: normal;

}

.small-box a{
    text-decoration: underline;
    color: var(--text-color);
    font-size: 20px;
    margin-top:5px;
    font-weight: 500;
}
.small-box a:hover{
  color: #57b1e4;
}
span.material-symbols-outlined{
  font-size: 40px;
}
/*  Message global de confirmation / erreur */
.message-box {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: bold;
  font-family: sans-serif;
}

/*  Affichage visible avec animation */
.message-box.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/*  Style de succès */
.message-box.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/*  Style d’erreur */
.message-box.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
/* footer */
footer{
    width: 100%;
    height: 50PX;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    color: var(--text-color);
    padding: 10px 0;
    margin-top: 50px;
}
  .box {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.box.visible {
  opacity: 1;
  transform: translateY(0);
}


/* --------------------- TABLETTE --------------------- */

@media  (max-width: 1024px){


.contact-box{
  width: 100%;
  display: flex;
  flex-direction: column;
}
.name-lastname, .email-phone{
  flex-direction: column;
}
#contact h2{
  font-size: 30px;
  margin: 0;
}
.button-send, .button-cancel{
  width: 30%;
}
.small-box{
 width: 100%;
}

.small-box a{
  margin: 0;
}
.small-box span.material-symbols-outlined{
  font-size: 30px;
}
}

            /* mobil */

@media  (max-width: 768px) {

#contact{
  width: 80%;
}
#contact h2{
  font-size: 20px;
}
.contact-box{
  margin-top: 20px;
}
.form{
  padding: 15px;
}
label ,input{
  font-size: 10px;
}
input{
    height: 30px;
}
.button-send,.button-cancel{
  padding: 5px;
  font-size: 12px;
}
.buttons{
    gap: 15px;
}
.small-box{
  padding: 10px;
} 
.small-box a{
  font-size: 14px;
}
footer{
  margin-bottom: 40px;
}

footer p{
  font-size: 12px;
}
}
