:root {
    --primary-text: #333333;
    --secondary-text: #555555;
    --background: #ffffff;
    --border-color: #edecec;
    --accent-color: #2EA3F2;
    --font-main: 'Open Sans', sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--primary-text);
    background-color: #f5f5f5;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.site-header {
    background-color: var(--background);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo img {
    max-width: 50px;
}

.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.main-menu ul li {
    margin: 0 10px 0 0;
}

.main-menu ul li a {
    text-decoration: none;
    color: var(--primary-text);
    font-weight: 600;
}

.main-menu ul li a:hover {
    color: var(--accent-color);
}

.language-selector {
    margin-bottom: 20px;
    text-align: right;
}

.language-selector button {
    background-color: transparent;
    color: var(--primary-text);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 0;
    cursor: pointer;
}

.language-selector button.active {
    background-color: var(--accent-color);
    color: var(--background);
}

h1, h2, h3 {
    color: var(--primary-text);
    font-weight: 600;
}
h2 {
    margin-top: 0;
}

.section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background);
    width: 100%;
    box-sizing: border-box;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px;
    margin: 8px 0 20px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-family: var(--font-main);
    background-color: #f9f9f9;
    box-sizing: border-box;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.visual-aid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.visual-aid img {
    max-width: 180px;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: zoom-in;
    position: relative;
    z-index: 1;
}
.visual-aid img:hover {
    transform: scale(2.5);
    z-index: 2; /* Assure que l'image zoomée reste au-dessus du texte */
    transform-origin: center;
}
.img-wrapper {
    position: relative;
    display: inline-block;
}
.img-wrapper:hover::after {
    content: attr(data-alt);
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 2000;
    pointer-events: none;
}
.altImg {
    display:none;
}
.img-wrapper:hover .altImg {
    display:block;
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 2000;
    pointer-events: none;
}
.search-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index:2;
}
#filePreview {
    margin: 15px 0;
    padding: 10px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    display: table;
    text-align: center;
}

table th {
    background-color: var(--accent-color);
    color: var(--background);
    padding: 12px;
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    min-width: 120px;
}

button {
    background-color: var(--accent-color);
    color: var(--background);
    border: none;
    padding: 12px 24px;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    width: auto;
    min-width: 150px;
    text-align: center;
}

button:hover {
    opacity: 0.9;
}

.note {
    font-size: 0.9em;
    color: var(--secondary-text);
    font-style: italic;
    margin: 15px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .language-selector {
        text-align: center;
        margin-left:-10px;
    }
    
    .logo img {
        max-width: 150px;
    }
    
    .main-menu ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-menu ul li {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table thead {
        display: none;
    }

    table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        min-width: 300px;
    }

    table td {
        display: block;
        text-align: right;
        padding: 8px;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 8px;
        font-weight: 600;
        text-align: left;
        width: 45%;
    }

    .visual-aid img {
        max-width: 150px;
    }
}

.input-error {
    border: 2px solid red !important;
    background-color: #fff5f5;
}

#loading-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fond noir semi-transparent */
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Désactive le scroll */
}

.loading-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    width: 80%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.loading-text {
    margin: 0;
    font-size: 18px;
    color: #333;
}

