:root {
  --background: #191919;
  --foreground: #fbfbfb;
  --primary: #942137;
  --border: #dadada ;
  --muted-foreground: #921227ab;
}

::selection {
  color: var(--background);
  background: var(--muted-foreground);
}

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

html {
    font-size: 16px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--foreground);
    color: var(--background);
}

body {
    opacity: 0;
    animation: pageFade 0.6s ease-out forwards;
}

@keyframes pageFade {
    to {
        opacity: 1;
    }
}

/* LAYOUT GENERAL */

main {
    width: 100%;
    padding: 2rem;
    height: 100vh;
}

.MainSection {

  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  height: 80%;
}

.ToggleLang {
    position: relative;
    display: flex;
    justify-content: flex-end;
    padding-bottom: 2rem;
    user-select: none;
    
}

.lang-btn {
    border: 2px solid var(--border);
    background: transparent;
    padding: 14px 20px;
    cursor: pointer;
    transition: 0.2s ease;
    border-radius: 6px;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

a {
 color: var(--background);
}

.lang-btn:hover {
    border-color: var(--primary);
}

/* SECTION PRINCIPALE */

.Monogram img {
    width: 350px;
    height: auto;
    user-select: none;
}

.description {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--background);
}

/* FORMULAIRE EMAIL */

.EmailSign {
    margin-top: 2rem;
}

.EmailSign form {
    display: flex;
    justify-content: center;
    width: 100%;
}

.EmailSign form > div {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
}

.EmailSign input[type="email"] {
    flex: 1;
    padding: 1rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s;
}

.EmailSign input[type="email"]:focus {
    border-color: var(--primary);
}

.EmailSign button {
    padding: 0 1.5rem;
    background: var(--primary);
    color: var(--foreground);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
}

.EmailSign button span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  line-height: 0;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

.input-error {
    animation: shake 0.35s ease;
}


.EmailSign button:hover:not([disabled]) {
  background: var(--muted-foreground);
}

.EmailSign button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

#email-message {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  min-height: 1em;
}

.error-container {
  height: 100vh;
display: flex;
flex-direction: column;
text-align: center;
justify-content: center;
align-items: center;
}

.error-message {
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--background);
}

.error-link {
  margin-top: 2rem;
  display: inline-block;
  padding: 1rem 1.4rem;
  background: var(--primary);
  color: #FFF;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s;
}
        
.error-link:hover {
  background: var(--muted-foreground);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 560px) {
  
    .lang-btn {
        padding: 14px 22px;
    }

    .Monogram img {
        width: 200px;
    }

    .EmailSign form > div {
        flex-direction: column;
    }

    .EmailSign button {
        width: 100%;
        padding: 1.75em 0.8rem;
        justify-content: center;
    }
}
