/* ---- Police system (sans dépendance externe) ---- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- BACKGROUND INDEX AVEC ZOOM ---- */

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;

    /* fallback JPG */
    background-image:
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('assets/img/background_index_light.jpg');
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    background-size: auto, 105% 105%;
    animation: backgroundZoom 3s ease-out forwards;
}

/* WebP */
@supports (background-image: url('assets/img/background_index_light.webp')) {
    body {
        background-image:
            linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
            url('assets/img/background_index_light.webp');
    }
}

/* AVIF */
@supports (background-image: url('assets/img/background_index_light.avif')) {
    body {
        background-image:
            linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
            url('assets/img/background_index_light.avif');
    }
}

/* Zoom */
@keyframes backgroundZoom {
    from { background-size: auto, 110% 110%; }
    to   { background-size: auto, 100% 100%; }
}


/* --- TITRE PRINCIPAL --- */
.main-title {
    font-size: 7em;
    text-align: center;
    margin-top: 320px;
    font-weight: bold;
    text-shadow: 0 3px 10px rgba(0,0,0,0.75);
    animation: fadeIn 1.2s ease-out;
}

/* --- SOUS-TEXTE --- */
.subtitle {
    text-align: center;
    margin-top: 10px;
    font-size: 1.6em;
    color: #fafafa;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    animation: fadeIn 1.6s ease-out;
}

/* === Animations manquantes === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- BLOCS ---- */
.content-blocks {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 20px;
}

.square-block {
    width: 400px;
    height: 215px;
    color: #fff;
    background: rgba(0, 0, 0, 0.40);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-direction: column;
    transition: 0.3s;
}

.square-block:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.05);
}

.square-block a {
    color: #009FCB;
    text-decoration: underline;
    font-weight: 600;
}
/* === Popup RGPD (centré, propre) === */
#cookie-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(320px, 90vw, 420px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 22px 20px;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(0,0,0,0.7);
  z-index: 9999;
  display: none; /* .show pour l’afficher */
}

#cookie-popup.show { display: block; }

#cookie-popup .popup-content {
  position: relative;
}

#cookie-popup .close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  background: #ffffff;
  color: #000;
  border-radius: 50%;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.6);
}

#cookie-popup p {
  margin: 0 0 14px 0;
  line-height: 1.45;
}

#cookie-popup a,
#cookie-popup a:visited {
  color: #009FCB;              /* plus de violet */
  text-decoration: underline;
}
#cookie-popup a:hover { color: #61C452; }

#cookie-popup .buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

#cookie-popup .buttons button {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #000;
  transition: background 0.2s;
}
#cookie-popup .buttons button:hover { background: #eaeaea; }

/* Mobile */
@media (max-width: 768px) {
  #cookie-popup {
    width: 92vw;
    padding: 18px 16px;
  }
  #cookie-popup .close {
    top: -10px;
    right: -10px;
    width: 26px; height: 26px; line-height: 24px;
  }
}

/* ---- MOBILE ---- */
@media(max-width: 768px){

    body {
        background-attachment: scroll;
        background-size: auto, cover !important;
        animation: none !important;
    }

    .top-bar {
        justify-content: center;
        flex-wrap: wrap;
        padding: 8px;
    }

    .main-title {
        font-size: 3.5em;
        margin-top: 140px;
    }

    .subtitle { font-size: 1.2em; }

    .square-block {
        width: 90%;
        height: auto;
    }

    .bottom-bar { font-size: 0.8em; }
}

/* === Page-specific tweaks (no inline styles) === */
.main-title.main-title-legal {
  margin-top: 160px;
}

.content-blocks.legal-content {
  margin-top: 30px;
  margin-bottom: 120px;
}

.content-blocks.construction-content {
  margin-top: 30px;
  margin-bottom: 120px;
}
