Bonjour,

J'essaie d'intégrer une vidéo YouTube de manière responsive. Mon problème est que je n'arrive pas à enlever totalement les bordures de la vidéo et la video n'est pas totalement centré sur smartphone.
Je l'ai fait pour des photos et ça me semble correct avec les media queries.

Si quelqu'un peut jeter un coup d'œil à mon code..

PHOTOS
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="fr">
 
<head>
    <title>Souvenirs ÉMY</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width" />
    <meta name="description" content="Souvenirs ÉMY" />
    <link rel="preload" href="fonts/reality_check.woff2" as="font" type="font/woff2" crossorigin>
    <link rel="stylesheet" href="styles.css" />
    <noscript>
        <link rel="stylesheet" href="noscript.css" />
    </noscript>
    <!-- favicon -->
    <link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="manifest" href="favicon/site.webmanifest">
    <link rel="mask-icon" href="favicon/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#da532c">
    <meta name="theme-color" content="#ffffff">
</head>
 
 
 
<body>
 
 
    <div class="photo-conteneur">
        <img src="images/souvenir_02.webp" alt="souvenir">
    </div>
 
 
 
</body>
 
</html>



VIDEOS
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="fr">
 
<head>
    <title>Souvenirs ÉMY</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width" />
    <meta name="description" content="Souvenirs ÉMY" />
    <link rel="preload" href="fonts/reality_check.woff2" as="font" type="font/woff2" crossorigin>
    <link rel="stylesheet" href="styles.css" />
    <noscript>
        <link rel="stylesheet" href="noscript.css" />
    </noscript>
    <!-- favicon -->
    <link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="manifest" href="favicon/site.webmanifest">
    <link rel="mask-icon" href="favicon/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#da532c">
    <meta name="theme-color" content="#ffffff">
</head>
 
 
 
<body>
 
 
 
    <div class="video-conteneur"> <iframe class="centrer-vid"
            src="https://www.youtube.com/embed/C0DPdy98e4c?version=3&loop=1&autoplay=1&controls=0&playlist=C0DPdy98e4c"
            title="YouTube video player" frameborder="0"
            allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
            allowfullscreen></iframe></div>
 
 
 
</body>
 
</html>


Code CSS : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
body {
  background-color: rgb(0, 0, 0);
  animation: fadein 3s;
  -moz-animation: fadein 3s; /* Firefox */
  -webkit-animation: fadein 3s; /* Safari et Chrome */
  -o-animation: fadein 3s; /* Opera */
}
@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@-moz-keyframes fadein {
  /* sur Firefox */
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@-webkit-keyframes fadein {
  /* sur Safari et Chrome */
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@-o-keyframes fadein {
  /* sur Opera */
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
 
body::before {
  content: "";
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-image: url(images/bg.webp);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: black;
}
 
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
 
/* Video */
 
.centrer-vid {
  text-align: center;
  margin-top: 50vh;
  transform: translateY(-50%);
  display: block;
  margin-left: auto;
  margin-right: auto;
  min-height: 75vh;
}
 
.video-conteneur iframe,
.video-container object,
.video-container embed {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 1em 3em 0.5em rgba(0, 0, 0, 0.623);
  border: solid #c80044 22px;
}
 
/* photo */
 
.photo-conteneur {
  display: flex;
  align-items: center;
  height: 300px;
}
 
img {
  width: 80%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1em 3em 0.5em rgba(0, 0, 0, 0.623);
  border: solid #c80044 22px;
  max-width: 100%;
  height: auto;
}
 
@media only screen and (min-width: 1680px) {
  img {
    width: 15%;
  }
}
 
/*Pour tous les appareils équipés d'écrans et dont la largeur est inférieure à 1680px*/
@media only screen and (max-width: 1680px) {
  img {
    width: 30%;
  }
}
 
@media only screen and (max-width: 1281px) {
  img {
    width: 30%;
  }
}
 
@media only screen and (max-width: 981px) {
  img {
    width: 50%;
  }
}
 
@media only screen and (max-width: 737px) {
  img {
    width: 65%;
  }
}
 
@media only screen and (max-width: 481px) {
  img {
    width: 75%;
  }
}
 
@media only screen and (max-height: 375px) {
  img {
    width: 25%;
  }
}
 
@media only screen and (max-height: 428px) {
  img {
    width: 25%;
  }
}



Si vous trouvez des incohérences dans mon code n'hésitez pas. Merci