/* =============================
   BASE & LAYOUT (CORRIGÉ)
============================= */
:root{
  --bg:#070b12;
  --card:#0c1220;
  --muted:rgba(255,255,255,.62);
  --text:rgba(255,255,255,.9);
  --line:rgba(255,255,255,.10);
  --accent:#7dd3fc;

  /* intro logo */
  --intro-duration: 10s;
  --intro-fade: .6s;
}

*{box-sizing:border-box}

html, body{
  height:100%;
}

body{
  margin:0;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  background:
    radial-gradient(1100px 700px at 70% -10%, rgba(125,211,252,.12), transparent 60%),
    var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto;
}

a{color:inherit;text-decoration:none}

/* page wrapper */
.wrap{
  max-width:1100px;
  width:100%;
  margin:0 auto;
  padding:22px 16px 40px;
  display:flex;
  flex-direction:column;
  flex:1 0 auto;
}

main{flex:1 0 auto;
	min-height: 1px; /* évite certains bugs flex quand contenu est vide */		  
	}

/* =============================
   INTRO LOGO
============================= */
.intro{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  background: radial-gradient(circle at 50% 30%, #222, #0b0b0b 60%, #000);
  opacity:1;
  pointer-events:none;
  animation: introOut var(--intro-fade) ease forwards;
  animation-delay: var(--intro-duration);
}

@keyframes introOut{
  to{ opacity:0; visibility:hidden; }
}

@media (prefers-reduced-motion: reduce){
  .intro{ display:none; }
}

/* =============================
   HEADER
============================= */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0 18px;
  border-bottom:1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width:42px;
  height:42px;
  border-radius:14px;
  background:rgba(255,255,255,.06);
  display:grid;
  place-items:center;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  overflow:hidden;
}

.logo svg{width:34px;height:34px;display:block}
.logo polygon{fill:rgba(255,255,255,.88)}

.brand h1{font-size:16px;margin:0}
.brand p{margin:2px 0 0;color:var(--muted);font-size:13px}

/* =============================
   BUTTONS
============================= */
.btn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
}
.btn:hover{border-color:rgba(255,255,255,.22)}

/* =============================
   GRID / CARDS
============================= */
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:14px;
  margin-top:18px;
}

.card{
  grid-column:span 12;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 16px 45px rgba(0,0,0,.35);
  cursor:pointer;
  transition:transform .15s ease, border-color .15s ease;
}
.card:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.20)}

@media(min-width:680px){ .card{grid-column:span 6;} }
@media(min-width:980px){ .card{grid-column:span 4;} }

.thumb{
  aspect-ratio:16/10;
  width:100%;
  object-fit:cover;
  display:block;
  background:#0b1020;
}

.pad{padding:12px 12px 14px}
.title{font-size:15px;margin:0 0 6px}
.teaser{margin:0;color:var(--muted);font-size:13px;line-height:1.35}

/* =============================
   FOOTER
============================= */
footer{
  margin-top:auto;
  padding-top:16px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.footerLeft{
  display:flex;
  align-items:center;
  gap:10px;
}

.footerLogo{
  width:18px;
  height:18px;
  display:block;
  opacity:.85;
}
.footerLogo polygon{fill:rgba(255,255,255,.75)}

footer button{
  all:unset;
  cursor:pointer;
  color:rgba(255,255,255,.75);
}
footer button:hover{
  color:#fff;
  text-decoration:underline;
}

/* =============================
   MODALS
============================= */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.62);
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:50;
}
.modal.open{display:flex}

.panel{
  width:min(980px, 100%);
  max-height:92vh;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(12,18,32,.96);
  box-shadow:0 30px 90px rgba(0,0,0,.55);
}

.panelHeader{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:14px;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  background:rgba(12,18,32,.96);
  backdrop-filter:blur(8px);
}

.panelHeader h2{margin:0;font-size:15px}
.close{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:#fff;
  border-radius:14px;
  padding:8px 10px;
  cursor:pointer;
}

.content{padding:14px}
.meta{color:var(--muted);font-size:13px;margin:0 0 10px}
.long{color:rgba(255,255,255,.84);font-size:14px;line-height:1.55;white-space:pre-wrap}

.gallery{
  margin-top:12px;
  display:flex;
  gap:10px;
  overflow:auto;
  padding-bottom:8px;
  scroll-snap-type:x mandatory;
}
.gallery img{
  height:260px;
  border-radius:16px;
  border:1px solid var(--line);
  scroll-snap-align:center;
}
@media(min-width:680px){
  .gallery img{height:340px;}
}

/* =============================
   CONTACT
============================= */
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.field input,.field textarea{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:#fff;
  border-radius:14px;
  padding:10px 12px;
  font:inherit;
}
.field textarea{min-height:120px;resize:vertical}
.row{display:grid;grid-template-columns:1fr;gap:10px}
@media(min-width:680px){ .row{grid-template-columns:1fr 1fr;} }
.ok{color:#86efac}
.err{color:#fca5a5}

																									
																									/* === Sticky footer garanti === */
.wrap{
  min-height: 100dvh; /* clé: la wrap doit au moins faire la hauteur écran */
}

.wrap > :last-child{
  margin-top: auto;   /* pousse le dernier bloc en bas */
}
