/* -------------------------
   Variables & Reset light
   ------------------------- */

:root {
    --sr-primary: #1f7ae0;
    --sr-primary-soft: #e7f1ff;
    --sr-accent: #00c1a6;
    --sr-dark: #132133;
    --sr-muted: #6c7a89;
    --sr-bg: #f5f7fb;
}

/* Body de base */

html, body {
    height: 100%;
}

body {
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--sr-bg);
    color: #222;
    padding-top: 45px; /* pour la navbar fixed-top */
}

/* Liens */

a {
    color: var(--sr-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* -------------------------
   Navbar
   ------------------------- */

.sr-navbar {
    background-color: #08060A;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sr-navbar .navbar-brand {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.sr-logo {
    height: 44px;
    width: auto;
    display: block;
}

/* Liens de menu = bleu Swissrescue */
.sr-navbar .nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.35rem 0.9rem;
    margin: 0 0.15rem;
    border-radius: 999px;
    color: #4AA8F5;
    transition: background-color 0.15s ease-out,
                color 0.15s ease-out,
                box-shadow 0.15s ease-out,
                transform 0.12s ease-out;
}

.sr-navbar .nav-link:hover,
.sr-navbar .nav-link:focus {
    color: #ffffff;
    background-color: rgba(74, 168, 245, 0.18);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
    transform: translateY(-1px);
}

/* État actif */
.sr-navbar .nav-link.active {
    background-color: #4AA8F5;
    color: #08060A;
    box-shadow: 0 6px 16px rgba(74, 168, 245, 0.55);
}

/* Toggler mobile */
.sr-navbar .navbar-toggler {
    border-color: #4AA8F5;
}
.sr-navbar .navbar-toggler-icon {
    filter: brightness(2); /* garde l’icône claire sur fond sombre */
}


/* -------------------------
   Hero section (Accueil)
   ------------------------- */

.hero-section {
    position: relative;
    min-height: 200px;
    /* gros padding bas pour que les cartes puissent mordre dans le bleu */
    padding: 35px 0 120px;
    color: #fff;
    background: radial-gradient(circle at 0% 0%, #38bdf8 0, #1f7ae0 40%, #0b1f3a 100%);
    overflow: hidden;
}

.hero-section::before,
.hero-section::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.35;
}

.hero-section::before {
    width: 240px;
    height: 240px;
    background: var(--sr-accent);
    top: -60px;
    right: 10%;
}

.hero-section::after {
    width: 200px;
    height: 200px;
    background: #f97316;
    bottom: -80px;
    left: 5%;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-section p.lead {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255,255,255,0.88);
}

/* Cartes d'accueil qui chevauchent le bandeau bleu */
.home-cards-container {
    margin-top: -80px;              /* -60 : léger, -80 : moyen, -100 : marqué */
    padding-top: 0 !important;      /* écrase le pt-5 de Bootstrap */
    margin-bottom: 3rem;            /* garde un peu d’air avant le footer */
    position: relative;
    z-index: 5;                     /* passe bien devant le fond bleu */
}

/* -------------------------
   Cards générales
   ------------------------- */

.card {
    border-radius: 1rem;
}

.card.shadow-sm {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.card-img-top {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    object-fit: cover;
    max-height: 220px;
}

.card-body h3,
.card-body h4 {
    line-height: 1.35;
}

/* Hover léger sur les cartes clicables */
.card.h-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

/* Placeholder d'image (accueil) */
.placeholder-img {
    height: 180px;
    border-radius: 1rem 1rem 0 0;
    font-size: 0.95rem;
}

/* -------------------------
   Boutons
   ------------------------- */

.btn-primary {
    background-color: var(--sr-primary);
    border-color: var(--sr-primary);
}

.btn-primary:hover {
    background-color: #1557a6;
    border-color: #1557a6;
}

.btn-outline-primary {
    color: var(--sr-primary);
    border-color: var(--sr-primary);
}

.btn-outline-primary:hover {
    background-color: var(--sr-primary-soft);
    color: var(--sr-primary);
}

.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-secondary:hover {
    background-color: rgba(15,23,42,0.04);
}

/* Petits boutons dans les listes */
.list-group-item .btn {
    font-size: 0.8rem;
}

/* -------------------------
   Sections & containers
   ------------------------- */

main .container,
.container {
    max-width: 1100px;
}

/* Titre de section */
h1, .h1, h2, .h2, h3, .h3 {
    letter-spacing: 0.01em;
}

/* -------------------------
   Article (page article.php)
   ------------------------- */

.article-body {
    font-size: 1rem;
    line-height: 1.6;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
    padding-left: 1.25rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
}

/* -------------------------
   FAQ & Accordions
   ------------------------- */

.accordion-button {
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: var(--sr-primary-soft);
    color: #111827;
}

/* -------------------------
   Footer
   ------------------------- */

footer {
    font-size: 0.9rem;
}

footer img {
    max-width: 100%;
}

/* -------------------------
   Utilitaires
   ------------------------- */

.text-primary-emphasis {
    color: #bfdbfe;
}

.bg-soft {
    background-color: var(--sr-primary-soft);
}

/* -------------------------
   Responsive
   ------------------------- */

@media (max-width: 991.98px) {
    body {
        padding-top: 30px;
    }

    .hero-section {
        padding: 70px 0 80px;  /* un peu plus de place en bas aussi sur mobile */
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 1.9rem;
    }
    .hero-section p.lead {
        font-size: 1rem;
    }
}

/* Ajuste le hero sur les grands écrans pour l'overlap des cartes */
@media (min-width: 992px) {
    .hero-section {
        min-height: 240px;
        padding: 40px 0 130px;  /* beaucoup de padding bas pour laisser dépasser les cartes */
    }

    .hero-section h1 {
        font-size: 2.4rem;  /* légèrement plus compact */
    }

    .hero-section p.lead {
        font-size: 1.02rem;
    }
}

