forms.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /* Style global du formulaire */
  2. form {
  3. max-width: 850px;
  4. margin: 50px auto;
  5. padding: 20px;
  6. background-color: #f9f9f9;
  7. border-radius: 8px;
  8. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  9. font-family: 'Arial', sans-serif;
  10. }
  11. /* Style pour les labels */
  12. form label {
  13. display: block;
  14. font-weight: bold;
  15. margin-bottom: 8px;
  16. color: #333;
  17. }
  18. /* Style pour les champs de saisie */
  19. form input[type="text"],
  20. form input[type="email"],
  21. form input[type="password"],
  22. form textarea,
  23. form select {
  24. width: 100%;
  25. padding: 12px;
  26. margin-bottom: 20px;
  27. border: 1px solid #ccc;
  28. border-radius: 4px;
  29. background-color: #fff;
  30. font-size: 16px;
  31. box-sizing: border-box;
  32. transition: border-color 0.3s ease-in-out;
  33. }
  34. /* Style pour les erreurs (si Symfony utilise des classes pour les erreurs) */
  35. form label + ul li {
  36. color: #e74c3c;
  37. font-size: 0.875rem;
  38. }
  39. /* Help de l'input */
  40. form .help-text {
  41. color: gray;
  42. margin-top: 0;
  43. margin-bottom: 30px;
  44. margin-left: 20px;
  45. }
  46. form .bouton-slug {
  47. margin: 0;
  48. padding: 5px;
  49. display: inline-block;
  50. color: gray;
  51. border: 1px solid black;
  52. text-decoration: none;
  53. border-radius: 5px;
  54. }
  55. form .div-bouton-slug {
  56. display: flex;
  57. justify-content: right;
  58. }
  59. form .ligne-slug {
  60. display: flex;
  61. justify-content: space-between;
  62. margin-bottom: 20px;
  63. }
  64. form .ligne-slug span {
  65. font-weight: bold;
  66. margin-bottom: 8px;
  67. color: #333;
  68. }
  69. /* Focus pour améliorer l'expérience utilisateur */
  70. form input[type="text"]:focus,
  71. form input[type="email"]:focus,
  72. form input[type="password"]:focus,
  73. form textarea:focus,
  74. form select:focus {
  75. border-color: #007bff;
  76. outline: none;
  77. box-shadow: 0 0 8px rgba(0, 123, 255, 0.25);
  78. }
  79. /* Style pour les textarea */
  80. form textarea {
  81. min-height: 150px;
  82. resize: vertical; /* Permet de redimensionner verticalement seulement */
  83. }
  84. /* Style pour les boutons */
  85. form button[type="submit"],
  86. form input[type="submit"] {
  87. display: inline-block;
  88. width: 100%;
  89. padding: 12px;
  90. font-size: 16px;
  91. font-weight: bold;
  92. color: #fff;
  93. background-color: #007bff;
  94. border: none;
  95. border-radius: 4px;
  96. cursor: pointer;
  97. transition: background-color 0.3s ease-in-out;
  98. }
  99. form button[type="submit"]:hover,
  100. form input[type="submit"]:hover {
  101. background-color: #0056b3;
  102. }
  103. /* Style pour les cases à cocher et les boutons radio */
  104. form input[type="checkbox"],
  105. form input[type="radio"] {
  106. margin-right: 10px;
  107. }
  108. /* Wrapper pour les cases à cocher et radio */
  109. .form-check {
  110. margin-bottom: 20px;
  111. }
  112. .form-check-label {
  113. display: inline-block;
  114. color: #333;
  115. }
  116. /* Style pour les messages d'erreur (champ obligatoire, etc.) */
  117. .invalid-feedback {
  118. color: #e74c3c;
  119. margin-top: -15px;
  120. margin-bottom: 10px;
  121. font-size: 0.875rem;
  122. }
  123. /* Message de succès */
  124. form .success-message {
  125. color: #28a745;
  126. font-size: 1rem;
  127. margin-bottom: 20px;
  128. display: none;
  129. }
  130. /* Style pour les selects */
  131. form select {
  132. appearance: none;
  133. background: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="none" stroke="%23333" stroke-width=".5" d="M2 0L0 2h4z"/></svg>') no-repeat right 10px center;
  134. background-size: 12px;
  135. }