:root {
    --primary-color: #D14900;
    --primary-color-hover: #a73700;
    --secondary-color: #0007d1;
    --font-family: "Rubik", sans-serif;
    --font-size: 14px;
    --button-font-size: 14px;
    --input-font-size: 14px !important;
    --button-padding: 4px 8px;
}


body {
    background-color: white;
    padding: 0;
    margin: 0;
    font-family: var(--font-family);

}
#main_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}



/* ------------------------------------------------------------ */

/* Base = mobile (par défaut) */
#form_container {
    width: 90%;
    height: 90%;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    grid-template-rows: repeat(24, 1fr);
}



#aieg_logo {
    grid-column: 3 / 8;
    grid-row: 1 / 3;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    background-color: white;
}

#aieg_logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#form_title {
    grid-column: 8 / 22;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 600;
    font-style: italic;
    background-color: white;
}

ol, ul {
    padding-inline-start: 24px;
}
button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: var(--button-padding);
    font-size: var(--button-font-size);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: var(--primary-color-hover);
}

.error{
    outline: 1px solid #C62828;
    background-color: #FFEBEE;
    animation: giggle 0.3s ease;
}
@keyframes giggle {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}



.formPage {
    border: 1px solid black;
    border-radius: 8px;
    grid-column: 2 / 24;
    grid-row: 2 / 24;
    background-color: white;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    padding: 10px;
    padding-top: 35px;
    font-size: var(--font-size);
    overflow-y: auto;
}
.formSpec {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#form_presentation_button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

#form_compteur input {
    width: calc(100% - 16px);
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: var(--input-font-size);
}

#mail_input {
    margin-bottom: 20px;
    margin-top: 20px;
}

#email_tip {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

#numero_compteur_input, #ean_input {
    margin-bottom: 10px;
    margin-top: 10px;
}

#form_compteur_button, #form_index_button, #form_confirm_button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

#recap_numero_compteur, #recap_ean, #confirm_numero_compteur, #confirm_ean {
    color: var(--primary-color);
    font-weight: bold;
}

/* Index input */
.index_input_container {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;

}
.index_input_title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
}


#index_input_old, #index_input_new_container {
    color: #666;
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
#index_th_old_value, #index_hp_old_value {
    font-size: var(--input-font-size);
    font-weight: bold;
    color: var(--primary-color);
    font-style: normal;
}
#index_hc_old_value {
    font-size: var(--input-font-size);
    font-weight: bold;
    color: var(--secondary-color);
    font-style: normal;
}
#index_input_hp_icon {
    color: var(--primary-color);
}
#index_input_hc_icon {
    color: var(--secondary-color);
}

.index_input_new {
    font-size: var(--input-font-size);
    font-weight: bold;
    color: var(--primary-color);
    font-style: normal;
    text-align: center;
    width: 140px;
}
#index_hc_new {
    color: var(--secondary-color);
}

.recap_index {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}
.recap_index_title {
    font-weight: bold;
    margin-bottom: 8px;
}
.recap_index_value {
    font-size: var(--input-font-size);
    font-weight: bold;
    font-style: normal;
}
#editIndex {
    background-color: transparent;
    color: black;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: var(--button-padding);
    font-size: var(--button-font-size);
    cursor: pointer;
}
#confirm_button_separator {
    height: 20px;
    width: 20px;
}

.SpecIcon {
    height: 35px;
    width: 35px;
}
.lucide-loader-icon {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


#responsiveHelper {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    z-index: 1000;
    background-color: red;
}


.renderIndex {
    width: 17px;
    height: 16px;
    padding: 2px;
    background-color: black;
    color: white;
    display: inline-block;
    font-family: monospace;
    text-align: center;
    border-radius: 4px;
}
.decimal {
    color: #EF9A9A;
}

/* ---------------------------------------------------------- */
/* Tablette */
@media screen and (min-width: 768px) {
    #responsiveHelper {
        background-color: orange;
    }
    #form_title {
        grid-column: 8 / 14;
    }
    :root {
        --font-size: 18px;
        --button-font-size: 18px;
        --input-font-size: 18px;
        --button-padding: 6px 12px;
    }
    .renderIndex {
        width: 20px;
        height: 22px;
        padding: 2px;
        font-size: 20px;
    }
}

/* Desktop */
@media screen and (min-width: 1024px) {
    #responsiveHelper {
        background-color: green;
    }
    .formPage:not(.formSpec) {
        padding-top: 100px;
    }
    :root{
        --input-font-size: 20px;
    }
    .index_input_new {
        width: 200px;
        padding: 4px 8px;
    }
    #email_tip {
        font-size: 14px;
    }
    .formPage {
        padding: 20px;
    }
}

/* Grand écran */
@media screen and (min-width: 1440px) {
    #responsiveHelper {
        background-color: blue;
    }
    #aieg_logo {
        grid-column: 3 / 6;
    }
    #form_title {
        grid-column: 6 / 10;
    }
    #form_container {
        max-width: 1200px;
    }
}