MikaFil commited on
Commit
bbe1b69
·
verified ·
1 Parent(s): d3a2638

Update style/default/style.css

Browse files
Files changed (1) hide show
  1. style/default/style.css +24 -15
style/default/style.css CHANGED
@@ -257,9 +257,8 @@ html, body { margin: 0; padding: 0; height: 100%; }
257
  color: #f0f0f0;
258
  border-radius: 14px;
259
  overflow: hidden;
260
- width: 90%;
261
- max-width: 400px;
262
- max-height: 85%;
263
  display: flex;
264
  flex-direction: column;
265
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
@@ -372,32 +371,42 @@ html, body { margin: 0; padding: 0; height: 100%; }
372
  display: flex;
373
  }
374
 
375
- /* Conteneur relatif pour positionner le bouton fermer par rapport à l'image */
 
376
  .ann-lb-content-wrap {
377
  position: relative;
378
- max-width: 90%;
379
- max-height: 90%;
380
- display: flex;
381
- align-items: center;
382
- justify-content: center;
383
  }
384
  .ann-lightbox img {
385
- max-width: 100%;
386
- max-height: 100%;
387
  object-fit: contain;
 
 
 
 
388
  border-radius: 8px;
389
- display: block;
390
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
 
 
 
 
 
 
 
 
 
 
 
391
  }
392
 
393
  /* ── Responsive — portrait mobile ── */
394
  @media (orientation: portrait) and (max-width: 768px) {
395
- .ann-tooltip { width: 93%; max-height: 83%; }
396
  .ann-img-wrap { max-height: 180px; }
397
  }
398
 
399
  /* ── Responsive — paysage mobile ── */
400
  @media (orientation: landscape) and (max-height: 520px) {
401
- .ann-tooltip { width: 82%; max-height: 90%; }
402
  .ann-img-wrap { max-height: 130px; }
403
- }
 
257
  color: #f0f0f0;
258
  border-radius: 14px;
259
  overflow: hidden;
260
+ width: min(400px, 90vw);
261
+ max-height: min(560px, 85vh);
 
262
  display: flex;
263
  flex-direction: column;
264
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
 
371
  display: flex;
372
  }
373
 
374
+ /* Grid trick : image et bouton fermer partagent la même cellule
375
+ le bouton se positionne dans le coin de l'image quelle que soit sa taille */
376
  .ann-lb-content-wrap {
377
  position: relative;
378
+ display: grid;
 
 
 
 
379
  }
380
  .ann-lightbox img {
381
+ display: block;
 
382
  object-fit: contain;
383
+ max-height: 90vh;
384
+ max-width: 90vw;
385
+ width: auto;
386
+ height: auto;
387
  border-radius: 8px;
 
388
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
389
+ grid-area: 1 / 1;
390
+ }
391
+ /* Bouton fermer positionné par le grid, sans position: absolute */
392
+ .ann-lb-close {
393
+ grid-area: 1 / 1;
394
+ align-self: start;
395
+ justify-self: end;
396
+ margin: 10px;
397
+ position: static !important;
398
+ top: unset !important;
399
+ right: unset !important;
400
  }
401
 
402
  /* ── Responsive — portrait mobile ── */
403
  @media (orientation: portrait) and (max-width: 768px) {
404
+ .ann-tooltip { width: min(400px, 93vw); max-height: min(560px, 83vh); }
405
  .ann-img-wrap { max-height: 180px; }
406
  }
407
 
408
  /* ── Responsive — paysage mobile ── */
409
  @media (orientation: landscape) and (max-height: 520px) {
410
+ .ann-tooltip { width: min(400px, 82vw); max-height: 90vh; }
411
  .ann-img-wrap { max-height: 130px; }
412
+ }