150 lines
2.8 KiB
SCSS
150 lines
2.8 KiB
SCSS
.modal-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 100;
|
|
}
|
|
|
|
.modal {
|
|
background: #111827;
|
|
border: 1px solid #1f2937;
|
|
border-radius: 16px;
|
|
padding: 2rem;
|
|
width: 100%;
|
|
max-width: 600px;
|
|
// Le contenu peut dépasser la hauteur de l'écran (formulaire long) :
|
|
// on borne la modale et on fait scroller l'intérieur en flex-column.
|
|
max-height: 90vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.modal-header { flex-shrink: 0; }
|
|
|
|
form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
// Marge interne pour que la scrollbar ne colle pas aux inputs.
|
|
margin-right: -0.5rem;
|
|
padding-right: 0.5rem;
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 2rem;
|
|
|
|
h2 { color: white; font-size: 1.25rem; font-weight: 600; }
|
|
}
|
|
|
|
.btn-close {
|
|
background: transparent;
|
|
border: none;
|
|
color: #6b7280;
|
|
cursor: pointer;
|
|
padding: 0.25rem;
|
|
border-radius: 6px;
|
|
display: flex;
|
|
transition: color 0.2s;
|
|
|
|
&:hover { color: white; }
|
|
}
|
|
|
|
.field {
|
|
margin-bottom: 1.5rem;
|
|
|
|
label {
|
|
display: block;
|
|
font-size: 0.875rem;
|
|
color: #d1d5db;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
input, textarea {
|
|
width: 100%;
|
|
background: #1f2937;
|
|
border: 1px solid #374151;
|
|
border-radius: 8px;
|
|
padding: 0.75rem 1rem;
|
|
color: white;
|
|
font-size: 0.9rem;
|
|
outline: none;
|
|
resize: none;
|
|
transition: border-color 0.2s;
|
|
|
|
&::placeholder { color: #4b5563; }
|
|
&:focus { border-color: #6c63ff; }
|
|
&.invalid { border-color: #ef4444; }
|
|
}
|
|
|
|
input[type="number"] { width: 120px; }
|
|
}
|
|
|
|
.info-box {
|
|
background: #1f2937;
|
|
border-radius: 8px;
|
|
padding: 1rem 1.25rem;
|
|
margin-bottom: 2rem;
|
|
font-size: 0.875rem;
|
|
color: #9ca3af;
|
|
line-height: 1.8;
|
|
|
|
ul {
|
|
margin: 0.5rem 0 0 1.25rem;
|
|
li strong { color: #d1d5db; }
|
|
}
|
|
}
|
|
|
|
.modal-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
// Actions collées en bas du scroll : visibles même si on n'a pas défilé
|
|
// jusqu'en bas du formulaire.
|
|
position: sticky;
|
|
bottom: 0;
|
|
background: #111827;
|
|
padding-top: 1rem;
|
|
margin-top: auto;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.btn-primary {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
padding: 0.75rem 1.5rem;
|
|
background: #6c63ff;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
|
|
&:hover:not(:disabled) { background: #5b52e0; }
|
|
&:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
}
|
|
|
|
.btn-secondary {
|
|
padding: 0.75rem 1.5rem;
|
|
background: #1f2937;
|
|
color: #d1d5db;
|
|
border: 1px solid #374151;
|
|
border-radius: 8px;
|
|
font-size: 0.9rem;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
|
|
&:hover { background: #374151; }
|
|
}
|