:root {
	--mc: #ff2d77;
	--mc: #17aa10;
	--mca: #17aa1080;
}

@font-face {
    font-family: 'Astra';
    src: url('Astra.ttf') format('truetype');
}

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

html, body {
  overflow-x: hidden;
}

body {
    font-family: 'Astra', sans-serif;
    background: linear-gradient(135deg, #1e1e2f, #3b3b5c);
    color: #ddd;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #2b2b44;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-in-out;
}

section {
	margin-bottom: 4rem;
}

h1 {
    font-size: 4rem;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-weight: normal;
	transition: transform 0.3s ease, text-shadow 0.3s ease;
}

h1:hover {
  text-shadow:
    0 0 5px var(--mc),
    0 0 10px var(--mc),
    0 0 20px var(--mc);
}

h2:hover, h3:hover, h4:hover, h5:hover, h6:hover {
	color: var(--mc);
}

h2, h3, h4, h5, h6 {
	transition: color 0.3s ease;
}

h2 {
    font-size: 2rem;
    color: #eee;
    font-weight: normal;
}

h3 {
    font-size: 2rem;
    color: #eee;
    font-weight: normal;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
    animation: fadeIn 1.3s ease-in-out;
}

p {
	margin-bottom: 2rem;
}

ul {
	list-style-type: "- ";
	margin-left: 30px;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #202030;
  padding: 1rem;
  text-align: center;
  color: #bbb;
  z-index: 1000;
}

nav ul {
    list-style: none;
    color: #aaa;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem 0;
	white-space: nowrap;
}

a {
    position: relative;
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 1px;
    width: 100%;
    height: 2px;
    background-color: #ddd;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

a:hover {
    color: var(--mc);
}

a:hover::after {
    transform: scaleX(0);
    background-color: var(--mc);
    transform-origin: right;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

strong {
	margin-left: 0;
    font-weight: normal;
    position: relative;
    color: #ddd;
    text-decoration: none;
	display: inline-block;
	cursor: pointer;
	transition: color 0.3s ease-in-out;
}

strong::before {
  content: '';
  position: absolute;
  top: 0px;
  left: -2px;
  right: 0;
  bottom: 8px;
  background-color: var(--mca);
  z-index: -1;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.3s ease-in-out;
  border-radius: 4px;
}

/* Active survol */
strong:hover::before {
  transform-origin: right;
  transform: scaleX(0);
}

strong:hover {
	color: var(--mc);
}

.machine-texture {
  position: relative;
  width: 192px;
  height: 192px;
  overflow: hidden;
  margin-top:0;
  margin-bottom:16px;
  background-color: #fff1;
  border-radius: 4px;
}

.machine-texture img.texture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  opacity: 0;
  animation: fadeCycle 18s linear infinite;
}

/* Animation en fondu */
@keyframes fadeCycle {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  20%  { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Décalage pour chaque image */
.machine-texture img.texture:nth-child(1) { animation-delay: 0s; }
.machine-texture img.texture:nth-child(2) { animation-delay: 3s; }
.machine-texture img.texture:nth-child(3) { animation-delay: 6s; }
.machine-texture img.texture:nth-child(4) { animation-delay: 9s; }
.machine-texture img.texture:nth-child(5) { animation-delay: 12s; }
.machine-texture img.texture:nth-child(6) { animation-delay: 15s; }
.control {
    color: #aaa;
}

.control:hover {
    animation: pulse 1s infinite ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
	0% { opacity: 1; }
	50% { opacity: 0.7; }
	100% { opacity: 1; }
}
