:root {
    --maxw: 1100px;
    --gap: 2rem;
    --pad: 1rem;
    --nav-bg: #313338;
    --nav-link: #ffffff;
    --accent: #9a8575;
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; margin: 0; overflow-x: hidden; }

body {
    margin: 0;
    font-family: "Playwrite DK Loopet", cursive; 
    font-size: 14px; 
    color: #222;
    background: #f6f6f6;
}

/* Header / navigation */
.header { position: sticky; top: 0; background: var(--nav-bg); z-index: 10; }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: .5rem var(--pad); }
.nav {
    display: flex; /* flex menu */
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.nav a {
    display: block;
    padding: .6rem .9rem;
    color: var(--nav-link);
    text-decoration: none;
    border-radius: .4rem;
}
.nav a:hover,
.nav a[aria-current="true"] {
    background: var(--accent);
}

/* Centered container with wide margins */
.container { max-width: var(--maxw); margin: 2rem auto; padding: 0 var(--pad); }

/* Two-column layout */
.columns {
    display: flex;             /* flex columns */
    gap: var(--gap);
    align-items: flex-start;
}
.left {
    flex: 0 0 500px;           /* fixed-ish portrait column; originally 320px */
}
.portrait {
    width: 100%;
    aspect-ratio: 2 / 3;       /* portrait */
    object-fit: cover;
    display: block;
    border-radius: .5rem;
    background: #ddd;
}
.rectangle {
    margin-top: 20px;
    height: 100;
    /* aspect-ratio: 2 / 3;       /\* portrait *\/ */
    /* object-fit: cover; */
    /* display: block; */
    border-radius: .5rem;
    background: #ddd;
}
.right {
    flex: 1 1 auto;            /* text column grows */
    min-width: 0;
}

/* Panels shown in right column */
.section { display: none; }
.section[aria-hidden="false"] { display: block; }

/* Responsive: stack columns on narrow viewports */
@media (max-width: 900px) {
    .columns { flex-direction: column; }
    .left { flex-basis: auto; max-width: 520px; }
}

/* Add heart line */

.heartline {
    display: block;
    margin: 1rem auto;             /* center horizontally */
    /* width: clamp(120px, 20%, 240px);/\* small fraction of text width, with limits *\/ */
    width: clamp(70px, 10%, 140px);/* small fraction of text width, with limits */
    height: auto;                   /* keep aspect ratio */
    border-radius: .5rem;           /* optional */
    margin-top: -0.5em;
}

/* Add a specific paragraph */



p.disney {
    font-family: "Playwrite DK Loopet", cursive;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 1.1rem;
    text-align: justify;
    hyphens: auto;         /* better spacing */
    line-height: 1.4;      /* readability */
    margin: 0.5em 0;
}

p.irl {
    font-family: Montserrat, Roboto, Arial, sans-serif; 
    font-size: 1rem;
    text-align: justify;
    hyphens: auto;         /* better spacing */
    line-height: 1.4;      /* readability */
    /* margin: 1em 0; */
    margin: 0.5em 0;
}

/* Thumbnail image styling */
.thumbnail {
  width: 150px;
  border: 1px solid #ccc;
  padding: 4px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  display: block;
  margin-bottom: 20px;
}

/* Normal image styling (no thumbnail, no shadow) */
.normal-image {
  max-width: 100%;
  display: block;
  margin-top: 20px;
}




.thumbnail {
  width: 150px;
  cursor: pointer;
  border-radius: 6px;
}

/* Modal overlay */
.modal {
  display: none;            /* hidden by default */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 999999;          /* very high to beat other CSS */
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;            /* shown when open */
}

/* Big image */
.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  z-index: 1;
}



/* Galerie responsive */

/* Empêche tout élément de dépasser l’écran */
* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; margin: 0; overflow-x: hidden; }

/* IMPORTANT : si un style global sur img existe, ça le neutralise */
#photo_gallery img,
#panel-photos img {
  max-width: 100%;
  height: auto;
}
/* img { max-width: 100%; height: auto; } */

/* Force les conteneurs à ne jamais s’élargir au-delà de l’écran */
#photo_gallery, #panel-photos, .section {
  width: 100%;
  max-width: 100%;
}

/* La grille */
.gallery{
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 12px;

  /* Par défaut : responsive automatique */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* Miniatures */
.gallery img{
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

/* Mobile : on impose 2 colonnes pour éviter les surprises */
@media (max-width: 480px){
  .gallery{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

    
/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 12px;
}

/* IMPORTANT : lightbox image = pas de crop */
#lightbox-img{
  width: auto !important;
  height: auto !important;
  max-width: 95vw !important;
  max-height: 85vh !important;
  object-fit: contain !important;
  border-radius: 6px;
}

/* Empêche les gestes bizarres sur mobile */
#lightbox { touch-action: pan-y; }
#lightbox-img { user-select: none; -webkit-user-drag: none; }


.lightbox button {
  position: absolute;
  background: rgba(255,255,255,0.8);
  border: none;
  font-size: 30px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 1000;
}

/* Navigation buttons */
.prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Close button */
.close {
  top: 20px;
  right: 20px;
  font-size: 24px;
}

/* override du style global button */
#imageModal .modal-close{
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 2147483647 !important;

  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;

  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;

  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 40px !important;
  line-height: 1 !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
}

