/* assets/css/material.css */

/* Variables et reset */
:root {
    --primary-color: #1976d2;
    --primary-dark: #0d47a1;
    --primary-light: #42a5f5;
    --accent-color: #ff4081;
    --text-primary: rgba(0, 0, 0, 1);
    --text-secondary: rgba(0, 0, 0, 1);
    --font-text: 'Rubik', sans-serif;
    --font-title: 'Source Sans Pro', sans-serif;
    --background: #f5f5f5;
    --surface: #ffffff;
    --error: #b00020;
    --success: #4caf50;
    --shadow-1: 0 2px 1px -1px rgba(0,0,0,0.2), 0 1px 1px 0 rgba(0,0,0,0.14), 0 1px 3px 0 rgba(0,0,0,0.12);
    --shadow-2: 0 3px 3px -2px rgba(0,0,0,0.2), 0 3px 4px 0 rgba(0,0,0,0.14), 0 1px 8px 0 rgba(0,0,0,0.12);
    --shadow-3: 0 5px 5px -3px rgba(0,0,0,0.2), 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12);
    --spacing-unit: 8px;
}

/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6,
.logo,
.nav-link,
.material-button,
.section-title {
    font-family: var(--font-title);
}

/* Style pour le contenu */
p, 
span, 
div, 
input, 
textarea, 
select,
label,
.material-input input,
.material-input textarea,
.material-input select {
    font-family: var(--font-text);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-unit) * 2;
}

/* Card styles */
.material-card {
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow-1);
    padding: 32px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    margin: 16px;
}

/* Form styles */
.material-input {
    position: relative;
    margin-bottom: 24px;
    width: 100%;
}

.material-input input,
.material-input select, .material-input textarea {
    width: 100%;
    height: 56px;
    padding: 20px 16px 4px;
    font-size: 16px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    background-color: transparent;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.material-input label {
    position: absolute;
    left: 16px;
    top: 20px;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    background-color: transparent;
    padding: 0 4px;
    pointer-events: none;
}

.material-input input:focus,
.material-input select:focus {
    border-color: var(--primary-color);
    border-width: 2px;
    outline: none;
}

.material-input input:focus ~ label,
.material-input input:not(:placeholder-shown) ~ label,
.material-input select:focus ~ label,
.material-input label ,
.material-input select:not([value=""]):valid ~ label {
    top: -6px;
    left: 12px;
    font-size: 12px;
    color: var(--primary-color);
    background-color: var(--surface);
}

/* Button styles */
/* Dans material.css - Modification des styles des boutons */

.material-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 48px;
    padding: 0 24px;
    background-color: var(--primary-color);
    color: white;          /* Couleur du texte */
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.25px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--shadow-1);
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 8px;
}

.material-button:hover {
    background-color: var(--primary-dark);
    color: white;          /* Garde le texte en blanc au survol */
    box-shadow: var(--shadow-2);
}

/* Pour les boutons outlined */
.material-button.outlined {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);    /* Couleur du texte pour outlined */
}

.material-button.outlined:hover {
    background-color: rgba(var(--primary-color-rgb), 0.04);
    color: var(--primary-color);    /* Garde la couleur primaire au survol */
}

/* Pour les boutons danger */
.material-button.danger {
    background-color: var(--error);
    color: white;
}

.material-button.danger:hover {
    background-color: #d32f2f;      /* Version plus foncée de l'erreur */
    color: white;
}

.material-button.danger.outlined {
    background-color: transparent;
    border: 1px solid var(--error);
    color: var(--error);
}

.material-button.danger.outlined:hover {
    background-color: rgba(176, 0, 32, 0.04);
    color: var(--error);
}
/* Alert styles */
.material-alert {
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 14px;
}

.material-alert.error {
    background-color: rgba(176, 0, 32, 0.08);
    color: var(--error);
}

.material-alert.success {
    background-color: rgba(76, 175, 80, 0.08);
    color: var(--success);
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Typography */
h1 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 32px;
    color: var(--text-primary);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Password requirements */
.password-requirements {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: -16px;
    margin-bottom: 24px;
    padding-left: 16px;
}

/* Form divider */
.form-divider {
    margin: 32px 0;
    border: none;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.12);
    position: relative;
    text-align: center;
}

.form-divider span {
    background-color: var(--surface);
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    top: -0.7em;
}

/* Select styling */
.material-input select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.54)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-card {
        margin: 8px;
        padding: 24px;
    }

    .material-input {
        margin-bottom: 20px;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 24px;
    }
}

/* Animation d'entrée */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeIn 0.3s ease-out;
}