:root {
    --primary-color: rgb(169, 5, 5);
    --sombre-primary-color: rgb(121, 3, 3);
    --secondary-color: #000000;
    --accent-color: #ffffff;
    --background-dark: rgba(0, 0, 0, 0.5);
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    font-family: 'Inria Sans', sans-serif;
    font-style: normal;
    transition: var(--transition);   
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

body {
    color: var(--secondary-color);
    line-height: 1.6;
    background-color: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image: linear-gradient(135deg, rgba(169, 5, 5, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.auth-container {
    background-color: var(--accent-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--sombre-primary-color) 100%);
    z-index: 2;
}

.auth-header {
    padding: 30px 30px 20px;
    text-align: center;
    position: relative;
}

.auth-header img {
    height: 60px;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.auth-header h2 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--dark-gray);
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    margin: 25px 30px 0;
    background-color: var(--medium-gray);
    border-radius: 50px;
    padding: 5px;
    position: relative;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-gray);
    z-index: 1;
    position: relative;
    border-radius: 50px;
}

.auth-tab.active {
    color: var(--accent-color);
}

.tab-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    height: calc(100% - 10px);
    width: calc(50% - 5px);
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--sombre-primary-color) 100%);
    border-radius: 50px;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.auth-content {
    padding: 30px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 15px;
    background-color: var(--light-gray);
    transition: var(--transition);
    display: flex;
    align-items: center;
    position: relative;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    background-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(169, 5, 5, 0.1);
}

.password-container {
    position: relative;
}

.form-group.password-wrapper {
    position: relative;
}
.toggle-password {
    position: absolute;
    right: 15px;
    top: 49px; /* Ajusté pour un alignement vertical avec le champ de saisie */
    cursor: pointer;
    color: #aaa;
    z-index: 2;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checkbox-group input {
    margin-right: 12px;
    margin-top: 3px;
    min-width: 18px;
    min-height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    font-size: 13px;
    color: var(--dark-gray);
    line-height: 1.5;
    user-select: none;
}

.checkbox-group label a {
    color: var(--primary-color);
    font-weight: 600;
}

.btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--sombre-primary-color) 100%);
    color: var(--accent-color);
    border: none;
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 6px rgba(169, 5, 5, 0.1);
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(169, 5, 5, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.forgot-password{
    display: block;
    text-align: right;
    margin: 20px 0;
    font-size: 13px;
    color: rgb(179, 179, 179);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--dark-gray);
    text-decoration: underline;
}

.btn-google {
    background: var(--accent-color);
    color: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-google img {
    height: 20px;
    margin-right: 12px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--dark-gray);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 5px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--dark-gray);
    font-size: 13px;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--medium-gray);
}

.divider::before {
    margin-right: 15px;
}

.divider::after {
    margin-left: 15px;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.loading-spinner {
    border: 3px solid rgba(169, 5, 5, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: var(--primary-color);
    font-size: 13px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

/* Modal de vérification */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.content {
    background-color: var(--accent-color);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
}

.content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 20px;
}

.content p {
    color: var(--dark-gray);
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.5;
}

.verification-options {
    margin-bottom: 25px;
}

.verification-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.verification-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(169, 5, 5, 0.03);
}

.verification-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(169, 5, 5, 0.05);
}

.verification-option input {
    margin-right: 12px;
    accent-color: var(--primary-color);
}

.verification-option label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
}

.verification-option .icon {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 20px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--dark-gray);
}

/* Animation pour le changement d'onglet */
@keyframes slideInLeft {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft 0.4s ease;
}

.slide-in-right {
    animation: slideInRight 0.4s ease;
}

/* Modal overlay */
.traitementInscription-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Fenêtre centrée */
.traitementInscription-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    position: relative;
    text-align: center;
    animation: fadeIn 0.3s;
}

.traitementInscription-content .close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #900;
    cursor: pointer;
}

.traitementInscription-content .modal-title {
    margin-bottom: 16px;
    color: #900;
    font-size: 1.4rem;
    font-weight: 700;
}

.traitementInscription-content .modal-message {
    margin-bottom: 24px;
    font-size: 1rem;
    color: #333;
}

.traitementInscription-content .contact {
    font-weight: bold;
    color: #900;
}

.traitementInscription-content .modal-ok {
    background: #900;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.traitementInscription-content .modal-ok:hover {
    background: #b00;
}
