/* --------- Base / variables --------- */
:root{
  --fg: rgba(255,255,255,.82);
  --fg-dim: rgba(255,255,255,.65);
  --muted: rgba(255,255,255,.35);
  --card-bg: rgba(255,255,255,.08);
  --card-bg-hover: rgba(255,255,255,.16);
  --brand: #3a6e9a;
  --ring: #3a6e9a;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{
  font-size: 16px;
}

body{
  margin: 0;
  color: var(--fg-dim);
  font-family: "Source Sans Pro", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.6;
  background: #000
              url("../../images/bg.jpg") top center / cover no-repeat fixed;
  /* voile lisibilité */
  position: relative;
  min-height: 100dvh;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 600px at 50% 0%, rgba(0,0,0,.45), rgba(0,0,0,.7) 60%, rgba(0,0,0,.85));
  pointer-events: none;
  z-index: 0;
}

img{ max-width: 100%; height: auto; display: block; }

/* Accessibilité */
.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}
.skip-link{
  position:absolute; left:-9999px; top:0; padding:.75rem 1rem; background:#000; color:#fff; z-index:1000;
}
.skip-link:focus{ left:1rem; top:1rem; border:2px solid var(--ring); border-radius:.5rem; }

/* Containers */
.container{
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* --------- Header --------- */
.site-header{
  text-align: center;
  padding: clamp(1rem, 4vw, 3rem) 0 2rem;
}
.header-inner{
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 1rem;
}
.brand{
  display: inline-grid;
  grid-template-columns: auto;
  justify-items: center;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border: 0;
}
.brand img{
  width: 300px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.4));
}
.brand-title{
  margin-top: .25rem;
  color: var(--fg);
  font-size: clamp(1.5rem, 4vw, 4rem);
  letter-spacing:.02em;
  margin: 0;
}
.tagline .subtitle{
  color: var(--fg);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin: .25rem 0 0;
}


.tagline .phone, 
.tagline .mail{
  margin: 0;
}


.tagline .phone{
  margin-top: 15px;
}

.tagline .phone a, 
.tagline .mail a{
  display: inline-block;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}
.tagline .phone a:hover, 
.tagline .mail a:hover{ border-bottom-color: transparent; }

/* --------- Cards --------- */
.cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-block: 1rem 3rem;
}

@media (max-width: 720px){
  .cards{ grid-template-columns: 1fr; }
}

.card{
  border-radius: var(--radius);
  background: var(--card-bg);
  overflow: clip;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  backdrop-filter: saturate(140%) blur(2px);
}

.card-link{
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
  border: 0;
  outline: none;
}

.card-media{
  margin: 0;
  line-height: 0;
  background: rgba(0,0,0,.2);
}

.card-media img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body{
  padding: 1rem 1rem 1.25rem;
  text-align: center;
}

.card-title{
  color: var(--fg);
  font-weight: 600;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.3;
  margin: .25rem 0 .5rem;
}

.card-text{
  margin: 0;
  color: var(--fg-dim);
  font-size: .95rem;
}

.card:hover,
.card:has(.card-link:focus-visible){
  background: var(--card-bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.25);
}

.card-link:focus-visible{
  outline: 0;
}

.card-link:focus-visible .card{
  box-shadow: var(--shadow), 0 0 0 3px var(--ring), inset 0 0 0 1px rgba(255,255,255,.25);
}

.btn-link{
  display: inline-block;
  border: 2px solid white;
  padding: 10px 12px;
  border-radius: 5px;
  color: white;
  margin-top: 15px;
}

/* --------- Footer --------- */
.site-footer{
  text-align: center;
  padding: 2.5rem 0 3.5rem;
}
.site-footer p{
  color: var(--fg);
  margin: 0;
  font-size: .95rem;
  opacity: .9;
} 

/* --------- Préférences utilisateur --------- */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}

/* --------- Utilitaires --------- */
:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: .5rem;
}





/* ===== Loader plein écran ===== */
html, body { height: 100%; }

/* On bloque le scroll pendant l'intro */
body.is-intro {
  overflow: hidden;
}

#loader{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background: #000; /* plein écran noir (au-dessus de ton fond) */
  z-index: 10000;   /* > à body::before (z-index:0) et à tout le reste */
  opacity: 1;
  transition: opacity .6s ease;
}

/* Logo dans le loader */
#loader .loader-logo{
  width: 35%;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.45));
  animation: logo-pop 8s ease-in-out both; /* petite entrée sympa */
}

/* Effet d'apparition/disparition du logo */
@keyframes logo-pop{
  0%   { opacity: 0; transform: scale(.85); }
  15%  { opacity: 1; transform: scale(1); }
  60%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 0; transform: scale(.98); }
}

/* État masqué après l'intro */
#loader.is-hidden{
  opacity: 0;
  pointer-events: none;
  /* on laisse l'élément se faire retirer en JS après la transition */
}

/* Respect des préférences utilisateur */ 
@media (prefers-reduced-motion: reduce){
  #loader .loader-logo { animation: none; }
  #loader { transition: none; }
}
