html {
    min-height: 100%;
    position: relative;
}
body {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #f0f4f9 0%, #e0e7ef 100%);
    background-attachment: fixed;
}

h1, h2, h3 {
    text-align: center;
    color: #1a3353;
    margin-bottom: 8px;
}
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
}
h2 {
    font-size: 1.3rem;
    font-weight: 500;
}
h3 {
    font-size: 1.1rem;
    font-weight: 400;
}

textarea {
    border: 2px dotted #b5c6e0;
    border-radius: 10px;
    background: #f4f8fb;
}

.container-login {
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.10), 0 1.5px 4px rgba(0,0,0,0.04);
    text-align: center;
    width: 70%;
    max-width: 600px;
    margin: 32px auto;
    padding: 32px 20px 24px 20px;
}

.container-competition {
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.10), 0 1.5px 4px rgba(0,0,0,0.04);
    text-align: center;
    width: 70%;
    max-width: 600px;
    margin: 32px auto;
    padding: 32px 20px 24px 20px;
}

.container-signoff {
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.10), 0 1.5px 4px rgba(0,0,0,0.04);
    text-align: center;
    width: 70%;
    max-width: 1200px;
    margin: 32px auto;
    padding: 32px 20px 24px 20px;
}

.container-export {
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.10), 0 1.5px 4px rgba(0,0,0,0.04);
    text-align: center;
    width: 70%;
    max-width: 1200px;
    margin: 32px auto;
    padding: 32px 20px 24px 20px;
}


img {
    max-width: 180px;
    display: block;
    margin: 0 auto 2px auto;
    transition: max-width 0.3s;
}


form {
    display: flex;
    flex-direction: column;
}

.form-closestep {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.form-addsmtmember {
    display: flex;
    align-items: center;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}
input {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 70%;
}
button {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

#checkmsa {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 5%;
}


.bddatepicker {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.birthdate-zone {
    display: flex;
    justify-content: center; /* Centrer horizontalement */
    align-items: center; /* Centrer verticalement */
    margin: 10px auto; /* Centrer horizontalement */
    width: 70%;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}

.completedsteps-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: left;
}

.btn-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    max-width: 180px;
    padding: 12px 8px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s;
}
.btn-step:hover {
    background: #0056b3;
}
.btn-step img {
    margin-bottom: 8px;
    width: 60px;
    height: 60px;
}

.button-login {
    padding: 10px;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0056b3;
}

button:hover {
    background-color: #0056b3;
}

.button-group {
    display: flex;
    justify-content: space-between;
}

.error-message {
    color: red;
    border: 1px solid red;
    padding: 10px;
    margin-top: 10px;
    display: none; /* Initially hidden */
}

.error-msg {
    background: #ffeaea;
    color: #c0392b;
    border: 1px solid #e57373;
    border-radius: 8px;
    padding: 12px;
    margin: 18px 0;
    font-size: 1.1rem;
}


main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

footer {
    background-color: gray;
    color: white;
    text-align: center;
    padding: 1rem 0;
}


select, button {
    width: 73%;
    padding: 15px;
    margin: 15px 0;
    box-sizing: border-box;
    font-size: 1.2em;
}

.div-add-smt-member-role {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: 70%;
}

.show-signature-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: center;
}


.select-role,
#other-role {
  height: 40px;
  padding: 5px 10px;
  font-size: 14px;
  box-sizing: border-box;
  margin: 5px 10px;
}

.other-role {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.other-role label {
  white-space: nowrap;
  font-size: 14px;
  line-height: 40px; /* aligne verticalement avec les champs */
  margin: 0;
}


#other-fields {
  display: none; /* masqué par défaut */
  margin-top: 10px;
  display: flex;
  justify-content: center; /* centre horizontalement */
  align-items: center;     /* centre verticalement si hauteur */
  flex-direction: column;  /* empile label et input verticalement */
  width: 52%;
}




@media (max-width: 768px) {
    header, footer {
        padding: 0.5rem 0;
    }

    form {
        padding: 15px;
    }

    select, button {
        padding: 12px;
        margin: 12px 0;
        font-size: 1.1em;
    }

    
    .container-competition {
        max-width: 98vw;
        padding: 12px 4vw;
    }
    h1, h3 {
        font-size: 1.1rem;
    }
    .button-container {
        flex-direction: column;
        gap: 10px;
    }
    .btn-step {
        width: 100%;
        min-width: unset;
        max-width: unset;
        font-size: 1rem;
        padding: 10px 0;
    }
    .btn-step img {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    header, footer {
        padding: 0.5rem 0;
    }

    form {
        padding: 10px;
    }

    select, button {
        padding: 10px;
        margin: 10px 0;
        font-size: 1.1em;
    }
}


table {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
}

.table-export {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
}



th.export {
    background-color: #ddd;
    padding: 10px;
    text-align: center;
    width: 50%;
}

table, th, td {

    border: 1px solid black;
}
th {
    background-color: #ddd;
    padding: 10px;
    text-align: center;
}
td {
    padding: 10px;
}

.separate {
    border-bottom: solid transparent;
    border-left: solid transparent;
    border-right: solid transparent;
}
.wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 200px;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: solid 1px #ddd;
    margin: 10px 0px;

}
.centered-wrapper {
    display: flex;
    justify-content: center; /* Centrer horizontalement */
    align-items: center; /* Centrer verticalement */
    margin: 10px auto; /* Centrer horizontalement */
}
.signature-pad {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.btn-secondary {
    color: red;
}
.btn-success {
    color: green;
}
.error-msg {

    color: red;
}
@media (max-width: 600px) {
    th, td {
        padding: 5px;
    }
    .wrapper {
        height: 150px;
    }
    .signature-pad {
        height: 150px;
    }
}

.empty {
    background-color: red;
}
.not-empty {
    background-color: green;
}

#experts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}
#experts-table th {
    background: #e3eaf6;
    color: #1a3353;
    font-weight: 600;
    padding: 12px 6px;
    border-bottom: 2px solid #c9d6e6;
}
#experts-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #e5e9f2;
    background: #fff;
}
#experts-table tr:last-child td {
    border-bottom: none;
}

#criterion-table {
    width: 80%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}
#criterion-table th {
    background: #e3eaf6;
    color: #1a3353;
    font-weight: 600;
    padding: 12px 6px;
    border-bottom: 2px solid #c9d6e6;
}
#criterion-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #e5e9f2;
    background: #fff;
}

#completedsteps-table {
    width: 80%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}
#completedsteps-table th {
    background: #e3eaf6;
    color: #1a3353;
    font-weight: 600;
    padding: 12px 6px;
    border-bottom: 2px solid #c9d6e6;
}
#completedsteps-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #e5e9f2;
    background: #fff;
}


#stepinfo-table {
    width: 80%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}
#stepinfo-table th {
    background: #e3eaf6;
    color: #1a3353;
    font-weight: 600;
    padding: 12px 6px;
    border-bottom: 2px solid #c9d6e6;
}
#stepinfo-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #e5e9f2;
    background: #fff;
}



#chiefexperts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
#chiefexperts-table th {
    background: #e3eaf6;
    color: #1a3353;
    font-weight: 600;
    padding: 12px 6px;
    border-bottom: 2px solid #c9d6e6;
}
#chiefexperts-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #e5e9f2;
    background: #fff;
}
#chiefexperts-table tr:last-child td {
    border-bottom: none;
}

.signature-pad {
    width: 100%;
    max-width: 400px;
    height: 200px;
    border: 2px dashed #b5c6e0;
    border-radius: 10px;
    background: #f4f8fb;
    display: block;
    margin: 0 auto 8px auto;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.button-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}
.btn, .btn-success, .btn-sm, .btn-secondary, .btn-abs, .btn-primary, .btn-warning, .btn-danger {
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    margin: 2px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    width: 100%;
}
.btn-success {
    background: #2ecc71;
    color: #fff;
}
.btn-success:hover {
    background: #27ae60;
}
.btn-sm, .btn-secondary {
    background: #e3eaf6;
    color: #1a3353;
}
.btn-sm:hover, .btn-secondary:hover {
    background: #c9d6e6;
}
.btn-abs {
    background: #f7ca18;
    color: #1a3353;
}
.btn-abs:hover {
    background: #f5b041;
}

.btn-refus {
    background:rgb(245, 75, 45);
    color: #1a3353;
}
.btn-refus:hover {
    background:rgb(245, 75, 45);
}

.btn-validation {
    background:rgb(11, 97, 0);
    color: #fff;
}
.btn-validation:hover {
    background:rgb(11, 97, 0);
}

.btn-validation:disabled {
    background:rgb(117, 121, 117);
}        
.btn-primary {
    background: #2980b9;
    color: #fff;
}
.btn-primary:hover {
    background: #1a5276;
}
.btn-warning {
    background: #f39c12;
    color: #fff;
}
.btn-warning:hover {
    background: #d68910;
}

.error-btn {
    background: #db5042;
    color: #fff;
}

.error-btn:hover {
    background: #db2614;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}
.btn-danger:hover {
    background: #c0392b;
}
.separate {
    height: 16px;
    background: transparent;
}

.wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 200px;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: solid 0px #ddd;
    margin: 10px 0px;

}

.wrapper-correction {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100px;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: solid 0px #ddd;
    margin: 10px 0px;

}

.centered-wrapper {
    display: flex;
    justify-content: center; /* Centrer horizontalement */
    align-items: center; /* Centrer verticalement */
    margin: 10px auto; /* Centrer horizontalement */
}

@media (max-width: 900px) {
    .container-signoff {
        max-width: 99vw;
        padding: 10px 2vw;
    }
}
@media (max-width: 700px) {
    .container-signoff {
        max-width: 100vw;
        width: 100vw;
        padding: 0;
        border-radius: 0;
    }
     .container-export {
        max-width: 100vw;
        width: 100vw;
        padding: 0;
        border-radius: 0;
    }
    #experts-table, #experts-table th, #experts-table td {
        font-size: 1.05rem;
        padding: 8px 2px;
    }
    .signature-pad {
        max-width: 100%;
        width: 100%;
        height: 180px;
    }
    .button-group {
        flex-direction: column;
        gap: 7px;
    }
    img {
        max-width: 110px;
    }

}
@media (max-width: 500px) {
    .container-signoff {
        padding: 0;
        max-width: 100vw;
        width: 100vw;
        border-radius: 0;
    }
    .container-export {
        padding: 0;
        max-width: 100vw;
        width: 100vw;
        border-radius: 0;
    }
    .signature-pad {
        max-width: 100%;
        width: 100%;
        height: 120px;
    }
    h1, h2, h3 {
        font-size: 1.05rem;
    }
    img {
        max-width: 80px;
    }
    body {
        font-size: 12px;
    }

}


.birthdate-error {
  color: red;
  font-weight: bold;
}



body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
}

.container {
    margin: 20px auto;
}

.progress-container {
    text-align: center;
    margin-bottom: 30px;
}

#progressbar {
    list-style-type: none;
    display: flex;
    justify-content: space-between;
    color: lightgrey;
}

#progressbar li {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    position: relative;
}

#progressbar li.active {
    color: #1d52a0;
}

.progress {
    height: 20px;
    background-color: lightgray;
    border-radius: 5px;
    overflow: hidden;
}


.progress-bar {
    background: linear-gradient(to right, #1d52a0, #2F8D46); /* bleu à gauche, vert à droite */
    width: 0;
    height: 100%;
    transition: width 0.4s ease-in-out;
    border-radius: 5px;
    background-size: 100% 100%;
    background-repeat: no-repeat;

}


.step-link {
    color: #1d52a0;
    text-decoration: none;
    cursor: pointer;
}

.step-link:hover {
    text-decoration: underline;
}

.disclaimer {
    font-family: Arial, sans-serif;
    color: #c45656;
    font-size: 18px;
    line-height: 1.5;
}

