.top {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.img-wrapper img {
    position: absolute;
    margin: auto;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: -100;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.img-wrapper {
    display: inline-block;
    overflow: hidden;
}

.above-top {
    padding-top: 100px;
    min-height: 40vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.5);
}

.top-text {
    text-align: center;
    color: #ffffff;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
}

.top-text img {
    width: 400px;
    margin: 0 auto;
    margin-bottom: 50px;
    filter: drop-shadow(0 10px 30px rgba(231, 0, 18, 0.3));
}

.second {
    background-color: #0f1419;;
    margin-top: 0;
}

.second h1 {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 50px;
    color: #ffffff;
}

#p-top {
    margin: 0 auto;
    width: 80%;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #b8c5d1;
}

.second h3 {
    text-align: center;
    margin: 0 auto;
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 10px;
    color: #ffffff;
 /*   background-color: #1a2332; */
}

.second-container {
    width: 80%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    margin: 0 auto;
    gap: 10px;
}

.q {
    flex: 1 1 calc(33% - 20px);
    max-width: calc(33% - 20px);
    box-shadow: 0px 10px 25px -10px rgba(231, 0, 18, 0.2);
    border-radius: 15px;
    padding: 0; /* flip-inner gère le padding */
    text-align: center;
    font-size: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #1e293b;
    margin-bottom: 20px;
    overflow: hidden;
}

.q:hover {
    transform: translateY(-10px);
    box-shadow: 0px 15px 30px -10px rgba(231, 0, 18, 0.3);
}

/* Flip Card Logic */
.flip-card {
    perspective: 1000px;
    cursor: pointer;
    width: 100%;
}

.flip-inner {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    display: grid;
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    background-color: #1e293b;
    width: 100%;
    position: relative; /* dynamic height */
    color: #ffffff;
}

.flip-front {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #2d3748;
    color: #b8c5d1;
}

.popup {
    z-index: 100;
    display: none;
    flex-direction: column;
    position: absolute;
    width: auto;
    max-width: 70%;
    box-shadow: 0 10px 50px -10px rgba(231, 0, 18, 0.3);
    height: auto;
    border-radius: 30px;
    padding: 20px;
    background-color: #1a2332;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
}

.popup .up {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.up .close {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: white;
    background-color: #e70012;
    margin-left: auto;
}

footer {
    color: white;
    text-align: center;
    background-color: #000000;
}

footer p {
    margin-bottom: 0;
}

.q {
    flex: 1 1 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    font-size: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    background: linear-gradient(145deg, #1e293b, #151d29);
    color: #ffffff;
    margin-bottom: 20px;
    perspective: 1000px;
    overflow: hidden;
    position: relative;
    min-height: 250px;
    text-align: center;
}


/* Responsive */
@media screen and (max-width: 1200px) {
    .second-container {
        width: 95%;
    }

    #p-top {
        width: 95%;
    }
}

@media screen and (max-width: 1000px) {
    .q {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

@media screen and (max-width: 700px) {
    .q {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .top-text img {
        width: 300px;
    }
}



.flip-inner {
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    position: relative;
    height: 100%;
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

/* Faces */
.flip-front, .flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-radius: 15px;
    padding: 20px;
    backface-visibility: hidden;
    box-sizing: border-box;
    background-color: #1e293b;
    color: #ffffff;
}

.flip-front {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
}

.flip-back {
    transform: rotateY(180deg);
    z-index: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 0;
    max-height: 0;
    transition: max-height 0.8s ease, opacity 0.6s ease;
    background-color: #2d3748;
    color: #b8c5d1;
}

/* back-content expands */
.flip-card.flipped .flip-back {
    opacity: 1;
    max-height: 1000px; /* assez grand pour n'importe quelle réponse */
    padding-bottom: 40px;
}



.q:hover {
    transform: translateY(-10px);
    box-shadow: 0px 15px 30px -10px rgba(231, 0, 18, 0.3);
}

/* Logique de la carte qui se retourne */
.flip-card {
    perspective: 1000px;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    display: grid;
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    grid-area: 1 / 1 / 2 / 2;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.4s ease;
}

.flip-front {
    background-color: #1e293b;
    text-align: center;
    font-size: 1.5rem;
    min-height: 250px;
    align-items: center;
    z-index: 2;
    color: #ffffff;
}

.flip-card.flipped .flip-front {
    opacity: 0;
    pointer-events: none;
}

.flip-back {
    background-color: #2d3748;
    transform: rotateY(180deg);
    text-align: left;
    font-size: 1rem;
    align-items: flex-start;
    z-index: 1;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    color: #b8c5d1;
}

.flip-back {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    background-color: #2d3748;
    transform: rotateY(180deg);
    text-align: center;
    font-size: 1rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    color: #b8c5d1;
}

.flip-card.flipped .flip-back {
    opacity: 1;
    max-height: 1000px;
    padding-bottom: 40px;
    overflow-y: auto;
}

.flip-back p {
    margin-bottom: 10px;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: auto;
    transition: transform 0.8s, height 0.4s ease;
    transform-style: preserve-3d;
    display: grid;
}
/* Fond dégradé comme .hero */
.faq-hero-background {
    background: linear-gradient(to bottom, #2d3748 0%, #1a2332 50%, #0f1419 100%);
    padding: 100px 20px 0;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}


/* Centrage du contenu intro + animation */
.faq-intro-animate {
    text-align: center;
    animation: fadeInUp 1.2s ease-out both;
    max-width: 800px;
    width: 100%;
}

/* Logo SG centré */
.logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

/* Logo image */
.sg-logo {
    width: 180px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 30px rgba(231, 0, 18, 0.3));
}

/* Glow identique à la page présentation */
.logo-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(231, 0, 18, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 3s ease-in-out infinite;
}

/* Fade + pulse animations (reprise exacte) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}


.flip-front,
.flip-back {
    background: transparent; /* laisse .q gérer le fond */
    color: #ffffff;
}

.flip-back {
    color: #b8c5d1;
}
.scroll-down-indicator,
.scroll-down-indicator:visited,
.scroll-down-indicator:hover,
.scroll-down-indicator:focus,
.scroll-down-indicator:active {
    color: #e70012;
    text-decoration: none;
    outline: none;
}

.scroll-down-indicator {
    display: block;
    margin: 40px auto 0;
    font-size: 2.2rem;
    color: #e70012;
    text-decoration: none;
    animation: bouncee 2s infinite;
    cursor: pointer;
    text-align: center;
}


.scroll-down-indicator:hover {
  transform: translateY(3px);
}

.scroll-down-indicator:active {
  transform: scale(0.95);
}

@keyframes bouncee {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

