@dsrc-cm/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dsrc.css +10743 -0
- package/dist/dsrc.min.css +1 -0
- package/package.json +44 -0
- package/src/base/print.css +404 -0
- package/src/base/reset.css +106 -0
- package/src/components/accordion/accordion.css +216 -0
- package/src/components/alert/alert.css +187 -0
- package/src/components/badge/badge.css +178 -0
- package/src/components/breadcrumb/breadcrumb.css +235 -0
- package/src/components/button/button.css +805 -0
- package/src/components/callout/callout.css +95 -0
- package/src/components/card/card.css +551 -0
- package/src/components/checkbox/checkbox.css +257 -0
- package/src/components/consent/consent.css +297 -0
- package/src/components/download/download.css +66 -0
- package/src/components/dropdown/dropdown.css +295 -0
- package/src/components/highlight/highlight.css +74 -0
- package/src/components/input/input.css +337 -0
- package/src/components/label/label.css +29 -0
- package/src/components/link/link.css +208 -0
- package/src/components/logo/logo.css +86 -0
- package/src/components/modal/modal.css +271 -0
- package/src/components/notice/notice.css +211 -0
- package/src/components/pagination/pagination.css +132 -0
- package/src/components/password/password.css +195 -0
- package/src/components/quote/quote.css +156 -0
- package/src/components/radio/radio.css +270 -0
- package/src/components/range/range.css +362 -0
- package/src/components/search/search.css +129 -0
- package/src/components/select/select.css +130 -0
- package/src/components/sidemenu/sidemenu.css +268 -0
- package/src/components/spinner/spinner.css +73 -0
- package/src/components/stepper/stepper.css +140 -0
- package/src/components/summary/summary.css +142 -0
- package/src/components/tab/tab.css +184 -0
- package/src/components/table/table.css +556 -0
- package/src/components/tag/tag.css +201 -0
- package/src/components/tile/tile.css +389 -0
- package/src/components/toggle/toggle.css +229 -0
- package/src/components/tooltip/tooltip.css +158 -0
- package/src/components/translate/translate.css +356 -0
- package/src/components/upload/upload.css +185 -0
- package/src/index.css +77 -0
- package/src/layout/bandeau/bandeau.css +44 -0
- package/src/layout/entete/entete.css +130 -0
- package/src/layout/footer/footer.css +107 -0
- package/src/layout/grid/grid.css +197 -0
- package/src/layout/hero/hero.css +86 -0
- package/src/layout/main/main.css +123 -0
- package/src/layout/navigation/navigation.css +206 -0
- package/src/utilities/utilities.css +430 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Checkbox Component
|
|
3
|
+
*
|
|
4
|
+
* Custom-styled checkbox using hidden native input + styled label pseudo-element.
|
|
5
|
+
* The native input remains in the DOM for accessibility (focus, :checked, screen readers).
|
|
6
|
+
*
|
|
7
|
+
* Variants:
|
|
8
|
+
* --sm ......... Smaller checkbox (16px)
|
|
9
|
+
* --inline ..... Horizontal layout
|
|
10
|
+
* --error ...... Error state (red left border)
|
|
11
|
+
* --valid ...... Valid state (green left border)
|
|
12
|
+
*
|
|
13
|
+
* Groups:
|
|
14
|
+
* .dsrc-checkbox-group (wrapper for a single checkbox + label)
|
|
15
|
+
* .dsrc-fieldset--checkbox (fieldset wrapper for multiple checkboxes)
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* <div class="dsrc-checkbox-group">
|
|
19
|
+
* <input type="checkbox" id="cb1" name="cb1">
|
|
20
|
+
* <label for="cb1">Option A</label>
|
|
21
|
+
* </div>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/* ============================================
|
|
26
|
+
* 1. Base checkbox group
|
|
27
|
+
* ============================================ */
|
|
28
|
+
|
|
29
|
+
.dsrc-checkbox-group {
|
|
30
|
+
position: relative;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
padding: var(--dsrc-spacing-2) 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dsrc-checkbox-group input[type="checkbox"] {
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 0;
|
|
40
|
+
left: 0;
|
|
41
|
+
width: 24px;
|
|
42
|
+
height: 24px;
|
|
43
|
+
margin: 0;
|
|
44
|
+
opacity: 0;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
z-index: 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dsrc-checkbox-group input[type="checkbox"] + label {
|
|
50
|
+
position: relative;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: flex-start;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
padding-left: 32px;
|
|
55
|
+
min-height: 24px;
|
|
56
|
+
font-family: var(--dsrc-font-family-sans);
|
|
57
|
+
font-size: var(--dsrc-font-size-body);
|
|
58
|
+
line-height: 1.5;
|
|
59
|
+
color: var(--dsrc-color-noir);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/* ============================================
|
|
65
|
+
* 2. Custom checkbox visual (label::before)
|
|
66
|
+
* ============================================ */
|
|
67
|
+
|
|
68
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::before {
|
|
69
|
+
content: '';
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 2px;
|
|
72
|
+
left: 0;
|
|
73
|
+
width: 24px;
|
|
74
|
+
height: 24px;
|
|
75
|
+
border: 2px solid var(--dsrc-color-gris-600);
|
|
76
|
+
border-radius: var(--dsrc-radius-small);
|
|
77
|
+
background-color: var(--dsrc-color-blanc);
|
|
78
|
+
transition: background-color 0.15s, border-color 0.15s;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Check icon (label::after) */
|
|
82
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::after {
|
|
83
|
+
content: '';
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: 2px;
|
|
86
|
+
left: 0;
|
|
87
|
+
width: 24px;
|
|
88
|
+
height: 24px;
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/%3E%3C/svg%3E");
|
|
91
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/%3E%3C/svg%3E");
|
|
92
|
+
-webkit-mask-size: 16px;
|
|
93
|
+
mask-size: 16px;
|
|
94
|
+
-webkit-mask-position: center;
|
|
95
|
+
mask-position: center;
|
|
96
|
+
-webkit-mask-repeat: no-repeat;
|
|
97
|
+
mask-repeat: no-repeat;
|
|
98
|
+
transition: background-color 0.15s;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/* ============================================
|
|
103
|
+
* 3. States
|
|
104
|
+
* ============================================ */
|
|
105
|
+
|
|
106
|
+
/* Checked */
|
|
107
|
+
.dsrc-checkbox-group input[type="checkbox"]:checked + label::before {
|
|
108
|
+
background-color: var(--dsrc-color-primaire);
|
|
109
|
+
border-color: var(--dsrc-color-primaire);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.dsrc-checkbox-group input[type="checkbox"]:checked + label::after {
|
|
113
|
+
background-color: var(--dsrc-color-blanc);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Focus */
|
|
117
|
+
.dsrc-checkbox-group input[type="checkbox"]:focus-visible + label::before {
|
|
118
|
+
outline: 2px solid var(--dsrc-color-primaire);
|
|
119
|
+
outline-offset: 2px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Hover */
|
|
123
|
+
.dsrc-checkbox-group input[type="checkbox"]:not(:disabled):hover + label::before {
|
|
124
|
+
border-color: var(--dsrc-color-primaire);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Disabled */
|
|
128
|
+
.dsrc-checkbox-group input[type="checkbox"]:disabled + label {
|
|
129
|
+
color: var(--dsrc-color-gris-400);
|
|
130
|
+
cursor: not-allowed;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.dsrc-checkbox-group input[type="checkbox"]:disabled + label::before {
|
|
134
|
+
background-color: var(--dsrc-color-gris-100);
|
|
135
|
+
border-color: var(--dsrc-color-gris-300);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.dsrc-checkbox-group input[type="checkbox"]:disabled:checked + label::before {
|
|
139
|
+
background-color: var(--dsrc-color-gris-400);
|
|
140
|
+
border-color: var(--dsrc-color-gris-400);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Hint text */
|
|
144
|
+
.dsrc-checkbox-group .dsrc-hint-text {
|
|
145
|
+
width: 100%;
|
|
146
|
+
margin: 0;
|
|
147
|
+
padding-left: 32px;
|
|
148
|
+
font-size: var(--dsrc-font-size-caption);
|
|
149
|
+
color: var(--dsrc-color-gris-600);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
/* ============================================
|
|
154
|
+
* 4. Small variant
|
|
155
|
+
* ============================================ */
|
|
156
|
+
|
|
157
|
+
.dsrc-checkbox-group--sm input[type="checkbox"] {
|
|
158
|
+
width: 16px;
|
|
159
|
+
height: 16px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.dsrc-checkbox-group--sm input[type="checkbox"] + label {
|
|
163
|
+
padding-left: 24px;
|
|
164
|
+
min-height: 16px;
|
|
165
|
+
font-size: var(--dsrc-font-size-caption);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.dsrc-checkbox-group--sm input[type="checkbox"] + label::before {
|
|
169
|
+
width: 16px;
|
|
170
|
+
height: 16px;
|
|
171
|
+
top: 3px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dsrc-checkbox-group--sm input[type="checkbox"] + label::after {
|
|
175
|
+
width: 16px;
|
|
176
|
+
height: 16px;
|
|
177
|
+
top: 3px;
|
|
178
|
+
-webkit-mask-size: 12px;
|
|
179
|
+
mask-size: 12px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
/* ============================================
|
|
184
|
+
* 5. Validation states
|
|
185
|
+
* ============================================ */
|
|
186
|
+
|
|
187
|
+
.dsrc-checkbox-group--error {
|
|
188
|
+
padding-left: var(--dsrc-spacing-3);
|
|
189
|
+
border-left: 2px solid var(--dsrc-color-erreur-bordure);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.dsrc-checkbox-group--valid {
|
|
193
|
+
padding-left: var(--dsrc-spacing-3);
|
|
194
|
+
border-left: 2px solid var(--dsrc-color-succes-bordure);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.dsrc-checkbox-group--error .dsrc-message {
|
|
198
|
+
color: var(--dsrc-color-erreur-texte);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.dsrc-checkbox-group--valid .dsrc-message {
|
|
202
|
+
color: var(--dsrc-color-succes-texte);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
/* ============================================
|
|
207
|
+
* 6. Inline layout
|
|
208
|
+
* ============================================ */
|
|
209
|
+
|
|
210
|
+
.dsrc-checkbox-group--inline {
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
margin-right: var(--dsrc-spacing-4);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
/* ============================================
|
|
217
|
+
* 7. High contrast (forced-colors)
|
|
218
|
+
* ============================================ */
|
|
219
|
+
|
|
220
|
+
@media (forced-colors: active) {
|
|
221
|
+
.dsrc-checkbox-group input[type="checkbox"] {
|
|
222
|
+
opacity: 1;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::before,
|
|
226
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::after {
|
|
227
|
+
display: none;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
/* ============================================
|
|
233
|
+
* 8. Reduced motion
|
|
234
|
+
* ============================================ */
|
|
235
|
+
|
|
236
|
+
@media (prefers-reduced-motion: reduce) {
|
|
237
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::before,
|
|
238
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::after {
|
|
239
|
+
transition: none;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
/* ============================================
|
|
245
|
+
* 9. Print
|
|
246
|
+
* ============================================ */
|
|
247
|
+
|
|
248
|
+
@media print {
|
|
249
|
+
.dsrc-checkbox-group input[type="checkbox"] {
|
|
250
|
+
opacity: 1;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::before,
|
|
254
|
+
.dsrc-checkbox-group input[type="checkbox"] + label::after {
|
|
255
|
+
display: none;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Consent Banner Component
|
|
3
|
+
*
|
|
4
|
+
* GDPR/privacy consent banner for government websites.
|
|
5
|
+
* Fixed at the bottom of the viewport with a semi-transparent backdrop.
|
|
6
|
+
* Includes an optional detailed settings modal for cookie customization.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* <div class="dsrc-consent" role="dialog" aria-label="Gestion des cookies">
|
|
10
|
+
* <div class="dsrc-consent__inner">
|
|
11
|
+
* <h2 class="dsrc-consent__title">Cookies et donnees personnelles</h2>
|
|
12
|
+
* <p class="dsrc-consent__body">Ce site utilise des cookies...</p>
|
|
13
|
+
* <div class="dsrc-consent__actions">
|
|
14
|
+
* <button class="dsrc-btn dsrc-btn--primary">Tout accepter</button>
|
|
15
|
+
* <button class="dsrc-btn dsrc-btn--secondary">Personnaliser</button>
|
|
16
|
+
* <button class="dsrc-btn dsrc-btn--tertiary">Tout refuser</button>
|
|
17
|
+
* </div>
|
|
18
|
+
* </div>
|
|
19
|
+
* </div>
|
|
20
|
+
*
|
|
21
|
+
* Modal (detailed settings):
|
|
22
|
+
* <div class="dsrc-consent__modal" role="dialog" aria-label="Parametres des cookies">
|
|
23
|
+
* <div class="dsrc-consent__modal-content">
|
|
24
|
+
* <header class="dsrc-consent__modal-header">
|
|
25
|
+
* <h2 class="dsrc-consent__modal-title">Parametres des cookies</h2>
|
|
26
|
+
* <button class="dsrc-consent__modal-close" aria-label="Fermer">×</button>
|
|
27
|
+
* </header>
|
|
28
|
+
* <div class="dsrc-consent__modal-body">
|
|
29
|
+
* <div class="dsrc-consent__group">
|
|
30
|
+
* <div class="dsrc-consent__group-header">
|
|
31
|
+
* <span>Cookies essentiels</span>
|
|
32
|
+
* <label class="dsrc-toggle">...</label>
|
|
33
|
+
* </div>
|
|
34
|
+
* <p class="dsrc-consent__group-desc">Necessaires au fonctionnement du site.</p>
|
|
35
|
+
* </div>
|
|
36
|
+
* </div>
|
|
37
|
+
* <footer class="dsrc-consent__modal-footer">
|
|
38
|
+
* <button class="dsrc-btn dsrc-btn--primary">Enregistrer</button>
|
|
39
|
+
* <button class="dsrc-btn dsrc-btn--tertiary">Annuler</button>
|
|
40
|
+
* </footer>
|
|
41
|
+
* </div>
|
|
42
|
+
* </div>
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/* ============================================
|
|
46
|
+
* Backdrop overlay
|
|
47
|
+
* ============================================ */
|
|
48
|
+
.dsrc-consent::before {
|
|
49
|
+
content: '';
|
|
50
|
+
position: fixed;
|
|
51
|
+
inset: 0;
|
|
52
|
+
background-color: var(--dsrc-color-overlay);
|
|
53
|
+
z-index: calc(var(--dsrc-z-index-overlay) - 1);
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* ============================================
|
|
58
|
+
* Banner — fixed at viewport bottom
|
|
59
|
+
* ============================================ */
|
|
60
|
+
.dsrc-consent {
|
|
61
|
+
position: fixed;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
z-index: var(--dsrc-z-index-overlay);
|
|
66
|
+
background-color: var(--dsrc-color-blanc);
|
|
67
|
+
box-shadow: var(--dsrc-shadow-xl);
|
|
68
|
+
font-family: var(--dsrc-font-family-sans);
|
|
69
|
+
color: var(--dsrc-color-noir);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Hidden state */
|
|
73
|
+
.dsrc-consent[aria-hidden="true"] {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* ============================================
|
|
78
|
+
* Inner container — centered, max-width
|
|
79
|
+
* ============================================ */
|
|
80
|
+
.dsrc-consent__inner {
|
|
81
|
+
max-width: var(--dsrc-layout-max-width);
|
|
82
|
+
margin: 0 auto;
|
|
83
|
+
padding: var(--dsrc-spacing-5) var(--dsrc-spacing-5);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* ============================================
|
|
87
|
+
* Title
|
|
88
|
+
* ============================================ */
|
|
89
|
+
.dsrc-consent__title {
|
|
90
|
+
font-size: var(--dsrc-font-size-h4);
|
|
91
|
+
font-weight: var(--dsrc-font-weight-semibold);
|
|
92
|
+
margin: 0 0 var(--dsrc-spacing-2) 0;
|
|
93
|
+
line-height: var(--dsrc-font-line-height-normal);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* ============================================
|
|
97
|
+
* Body text
|
|
98
|
+
* ============================================ */
|
|
99
|
+
.dsrc-consent__body {
|
|
100
|
+
font-size: var(--dsrc-font-size-small);
|
|
101
|
+
line-height: var(--dsrc-font-line-height-loose);
|
|
102
|
+
color: var(--dsrc-color-gris-600);
|
|
103
|
+
margin: 0 0 var(--dsrc-spacing-4) 0;
|
|
104
|
+
max-width: 80ch;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* ============================================
|
|
108
|
+
* Actions — button group
|
|
109
|
+
* ============================================ */
|
|
110
|
+
.dsrc-consent__actions {
|
|
111
|
+
display: flex;
|
|
112
|
+
gap: var(--dsrc-spacing-3);
|
|
113
|
+
flex-wrap: wrap;
|
|
114
|
+
align-items: center;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* ============================================
|
|
118
|
+
* Responsive: mobile (< 768px)
|
|
119
|
+
* ============================================ */
|
|
120
|
+
@media (max-width: 767px) {
|
|
121
|
+
.dsrc-consent__inner {
|
|
122
|
+
padding: var(--dsrc-spacing-4) var(--dsrc-spacing-3);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.dsrc-consent__actions {
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
align-items: stretch;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.dsrc-consent__actions .dsrc-btn {
|
|
131
|
+
width: 100%;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ============================================
|
|
137
|
+
* Settings modal — detailed cookie preferences
|
|
138
|
+
* ============================================ */
|
|
139
|
+
.dsrc-consent__modal {
|
|
140
|
+
position: fixed;
|
|
141
|
+
inset: 0;
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
background-color: var(--dsrc-color-overlay);
|
|
146
|
+
z-index: var(--dsrc-z-index-overlay);
|
|
147
|
+
padding: var(--dsrc-spacing-5);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.dsrc-consent__modal[aria-hidden="true"] {
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.dsrc-consent__modal-content {
|
|
155
|
+
background-color: var(--dsrc-color-blanc);
|
|
156
|
+
border-radius: var(--dsrc-radius-default);
|
|
157
|
+
box-shadow: var(--dsrc-shadow-xl);
|
|
158
|
+
max-width: 600px;
|
|
159
|
+
width: 100%;
|
|
160
|
+
max-height: 90vh;
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Modal header */
|
|
166
|
+
.dsrc-consent__modal-header {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: space-between;
|
|
170
|
+
padding: var(--dsrc-spacing-4) var(--dsrc-spacing-5);
|
|
171
|
+
border-bottom: 1px solid var(--dsrc-color-gris-200);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dsrc-consent__modal-title {
|
|
175
|
+
font-size: var(--dsrc-font-size-h4);
|
|
176
|
+
font-weight: var(--dsrc-font-weight-semibold);
|
|
177
|
+
margin: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.dsrc-consent__modal-close {
|
|
181
|
+
background: transparent;
|
|
182
|
+
border: none;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
padding: var(--dsrc-spacing-2);
|
|
185
|
+
font-size: var(--dsrc-font-size-h4);
|
|
186
|
+
line-height: 1;
|
|
187
|
+
color: var(--dsrc-color-gris-600);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.dsrc-consent__modal-close:hover {
|
|
191
|
+
color: var(--dsrc-color-noir);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.dsrc-consent__modal-close:focus-visible {
|
|
195
|
+
outline: var(--dsrc-outline-width) solid var(--dsrc-color-primaire-focus);
|
|
196
|
+
outline-offset: var(--dsrc-outline-offset);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.dsrc-consent__modal-close:active {
|
|
200
|
+
color: var(--dsrc-color-gris-800);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Modal body — scrollable */
|
|
204
|
+
.dsrc-consent__modal-body {
|
|
205
|
+
padding: var(--dsrc-spacing-5);
|
|
206
|
+
overflow-y: auto;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Modal footer */
|
|
210
|
+
.dsrc-consent__modal-footer {
|
|
211
|
+
display: flex;
|
|
212
|
+
gap: var(--dsrc-spacing-3);
|
|
213
|
+
justify-content: flex-end;
|
|
214
|
+
padding: var(--dsrc-spacing-4) var(--dsrc-spacing-5);
|
|
215
|
+
border-top: 1px solid var(--dsrc-color-gris-200);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* ============================================
|
|
219
|
+
* Cookie group — individual category
|
|
220
|
+
* ============================================ */
|
|
221
|
+
.dsrc-consent__group {
|
|
222
|
+
padding: var(--dsrc-spacing-4) 0;
|
|
223
|
+
border-bottom: 1px solid var(--dsrc-color-gris-200);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.dsrc-consent__group:first-child {
|
|
227
|
+
padding-top: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.dsrc-consent__group:last-child {
|
|
231
|
+
border-bottom: none;
|
|
232
|
+
padding-bottom: 0;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.dsrc-consent__group-header {
|
|
236
|
+
display: flex;
|
|
237
|
+
align-items: center;
|
|
238
|
+
justify-content: space-between;
|
|
239
|
+
gap: var(--dsrc-spacing-3);
|
|
240
|
+
font-size: var(--dsrc-font-size-body);
|
|
241
|
+
font-weight: var(--dsrc-font-weight-medium);
|
|
242
|
+
color: var(--dsrc-color-noir);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.dsrc-consent__group-desc {
|
|
246
|
+
font-size: var(--dsrc-font-size-small);
|
|
247
|
+
line-height: var(--dsrc-font-line-height-loose);
|
|
248
|
+
color: var(--dsrc-color-gris-600);
|
|
249
|
+
margin: var(--dsrc-spacing-2) 0 0 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* ============================================
|
|
253
|
+
* Responsive modal: mobile (< 768px)
|
|
254
|
+
* ============================================ */
|
|
255
|
+
@media (max-width: 767px) {
|
|
256
|
+
.dsrc-consent__modal {
|
|
257
|
+
padding: 0;
|
|
258
|
+
align-items: flex-end;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.dsrc-consent__modal-content {
|
|
262
|
+
max-width: 100%;
|
|
263
|
+
max-height: 85vh;
|
|
264
|
+
border-radius: var(--dsrc-radius-large) var(--dsrc-radius-large) 0 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.dsrc-consent__modal-footer {
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
align-items: stretch;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.dsrc-consent__modal-footer .dsrc-btn {
|
|
273
|
+
width: 100%;
|
|
274
|
+
justify-content: center;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
/* ============================================
|
|
280
|
+
* High contrast (forced-colors)
|
|
281
|
+
* ============================================ */
|
|
282
|
+
|
|
283
|
+
@media (forced-colors: active) {
|
|
284
|
+
.dsrc-consent {
|
|
285
|
+
border-top: 2px solid ButtonText;
|
|
286
|
+
box-shadow: none;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.dsrc-consent__modal-content {
|
|
290
|
+
border: 2px solid ButtonText;
|
|
291
|
+
box-shadow: none;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.dsrc-consent__modal-close:focus-visible {
|
|
295
|
+
outline: 2px solid Highlight;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Download Component
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* <a class="dsrc-download" href="/doc.pdf" download>
|
|
6
|
+
* <span class="dsrc-download__info">
|
|
7
|
+
* <span class="dsrc-download__title">Formulaire d'inscription</span>
|
|
8
|
+
* <span class="dsrc-download__details">PDF — 245 Ko</span>
|
|
9
|
+
* </span>
|
|
10
|
+
* <span class="dsrc-download__icon" aria-hidden="true">⬇</span>
|
|
11
|
+
* </a>
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
.dsrc-download {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
gap: var(--dsrc-spacing-3);
|
|
19
|
+
padding: var(--dsrc-spacing-3) var(--dsrc-spacing-4);
|
|
20
|
+
background-color: var(--dsrc-color-blanc);
|
|
21
|
+
border: 1px solid var(--dsrc-color-gris-200);
|
|
22
|
+
border-radius: var(--dsrc-radius-default);
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
color: var(--dsrc-color-noir);
|
|
25
|
+
font-family: var(--dsrc-font-family-sans);
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
transition: border-color var(--dsrc-transition-duration-fast) ease, box-shadow var(--dsrc-transition-duration-fast) ease;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dsrc-download:hover {
|
|
31
|
+
border-color: var(--dsrc-color-primaire);
|
|
32
|
+
box-shadow: var(--dsrc-shadow-md);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dsrc-download:active {
|
|
36
|
+
border-color: var(--dsrc-color-primaire-fonce);
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dsrc-download:focus-visible {
|
|
41
|
+
outline: var(--dsrc-outline-width) solid var(--dsrc-color-primaire-focus);
|
|
42
|
+
outline-offset: var(--dsrc-outline-offset);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dsrc-download__info {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: var(--dsrc-spacing-1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dsrc-download__title {
|
|
52
|
+
font-size: var(--dsrc-font-size-small);
|
|
53
|
+
font-weight: var(--dsrc-font-weight-semibold);
|
|
54
|
+
color: var(--dsrc-color-primaire);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dsrc-download__details {
|
|
58
|
+
font-size: var(--dsrc-font-size-caption);
|
|
59
|
+
color: var(--dsrc-color-gris-600);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dsrc-download__icon {
|
|
63
|
+
font-size: var(--dsrc-font-size-h4);
|
|
64
|
+
color: var(--dsrc-color-primaire);
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
}
|