
/* =====================================================
    VARIABLES GLOBALES
   ===================================================== */
:root {
    /* Couleurs de fond */
    --color-background-1: #0f111a;
    --color-background-2: #1b1d2b;
    --color-background-3: #141520;

--color-background-4: linear-gradient(135deg, #141520, #1b1d2b);


    --bg-gradient: linear-gradient(135deg, #4b6cb7, #182848);
    --bg-speed: 20s;

    /* Couleurs principales et accent */
    --color-primary: #4fc3f7;
    --color-secondary: #ffd54f;
    --color-accent: #f06292;

    /* Texte */
    --color-text: #e5e5e5;
    --color-text-light: #ffffff;

    /* Triangle */
    --color-triangle: #ff5fa2;

    /* Typographie */
    --font-base: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;

    /* Ombres modernes */
    --shadow-light: 0 2px 8px rgba(0,0,0,0.25);
    --shadow-medium: 0 6px 20px rgba(0,0,0,0.35);

    /* Rayons */
    --border-radius: 0.75rem;

    /* Animation */
    --transition-speed: 0.4s;
}


/* =====================================================
    GLOBAL BODY / HTML
===================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font-base);
    scroll-behavior: smooth;
    background-color: var(--color-background-3);
}

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

form textarea {
    resize: none;
}

/* Formulaires arrondis */
#contact-form,
#contact-form input,
#contact-form textarea,
#contact-form button {
    font-family: 'Nunito', sans-serif;
}


h1, h2, h3 {
    font-family: 'Rajdhani', 'Helvetica Neue', Arial, sans-serif;
}


/* ======================================
    LOAD ANIMATIONS
====================================== */
.blur-load {
    opacity: 1;
    transform: translateY(0);
    filter: blur(6px);
    transition: filter 0.8s ease-out, opacity 0.8s ease-out, transform 0.8s ease-out;

}

.blur-load.loaded {
    filter: blur(0);
}


/* =====================================================
    SETTINGS
===================================================== */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--color-accent);
}

#footer .footer-right i {
    color: var(--color-accent);
    font-size: clamp(1.4rem, 4.5vw, 2rem);
    transition: color var(--transition-speed), transform 0.2s ease;
}

#footer .footer-right i:hover {
    color: var(--color-secondary);
}

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


/* =====================================================
    CLASSES SECTIONS
===================================================== */
.font-color-1 {
    background-color: var(--color-background-1);
}

.font-color-2 {
    background-color: var(--color-background-2);
}

section#en-tete.font-banner {
    background-color: #a7a7a7;
}

strong {
    color: var(--color-primary);
    font-weight: 700;
}


/* =====================================================
    SECTIONS GÉNÉRALES
===================================================== */
section {
    padding: 4rem 2rem;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.section-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.section-details {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.section-item {
    flex: 1 1 45%;
}


/* =====================================================
    TITRES DE SECTION
===================================================== */
h1.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-light);
    position: relative;
    padding-left: 25px;
    margin-bottom: 30px;
    display: block;
}

h1.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

h1.section-title:hover::before {
    background-color: var(--color-primary);
    transform: scaleY(1.1);
}

h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}


/*
#services h1.section-title {
    text-align: left;
    margin-left: clamp(1.5rem, 12vw, 6rem);
    padding-left: 1rem;
    position: relative;
}

#services h1.section-title::before {
    left: clamp(-1.5rem, 4vw, 0.5rem);
    position: absolute;
}*/


/* =====================================================
    RESPONSIVE PC
===================================================== */
@media (max-width: 900px) {
    #services h1.section-title {
        text-align: left;
        margin-left: 1rem;
        padding-left: 1.5rem;
    }

    #services h1.section-title::before {
        left: 0;
    }
}

@media (max-width: 768px) {
    h1.section-title {
        font-size: 2rem;
        padding-left: 20px;
    }

    h1.section-title::before {
        width: 3px;
    }

    .section-details {
        flex-direction: column;
    }

    .section-item {
        flex: 1 1 100%;
    }
}

@media (max-width: 500px) {
    h1.section-title {
        font-size: 1.5rem;
        padding-left: 15px;
    }

    h1.section-title::before {
        width: 2px;
    }

    h2 {
        font-size: 1rem;
    }

    .form-generic button {
        width: 100%;
    }
}


/* =====================================================
    PARAGRAPHES & HR
===================================================== */
p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: var(--line-height-base);
    color: var(--color-text);
}

hr {
    border: none;
    height: 1px;
    background-color: var(--color-primary);
    margin: 1rem 0;
}

.note {
    font-size: 0.85rem;
    color: var(--color-secondary);
}


/* ======================================
    ANIMATION DANS SECTIONS
====================================== */
.section-content-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-content-animate.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =====================================================
    FORMULAIRES
===================================================== */
.form-wrapper {
    max-width: 600px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-generic {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-generic input,
.form-generic textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: box-shadow var(--transition-speed),
                border-color var(--transition-speed);
}

.form-generic input:focus,
.form-generic textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
}

.form-generic button {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--color-accent);
    color: var(--color-text-light);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

#contact-form .form-wrapper {
    background-color: var(--color-background-2);
    padding: 2.5rem;
    border-radius: var(--border-radius);
}

#contact-form h2 {
    color: var(--color-text-light);
}

#contact-form input,
#contact-form textarea {
    background-color: #11131f;
    color: var(--color-text-light);
    border: 1px solid rgba(255,255,255,0.15);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(255,255,255,0.6);
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79,195,247,0.25);
}

#contact-form button {
    background-color: var(--color-accent);
    color: white;
}

#contact-form button:hover {
    background-color: var(--color-secondary);
    opacity: 0.9;
    color: black;
}

#contact {
    color: #ffffff;
}

#contact h2 i {
    color: var(--color-accent);
    margin-right: 0.5rem;
}


/* =====================================================
    CTA / BOUTONS
===================================================== */
.cta-container {
    text-align: center;
    margin-top: 1.5rem;
}

.cta-link {
    margin-top: 70px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.cta-link::after {
    content: "";
    display: inline-block;
    margin-top: 5px;
    width: 1.2rem;
    height: 1.2rem;
    margin-left: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23f06292" viewBox="0 0 24 24"><path d="M5 12h14M13 5l7 7-7 7"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s, background-image 0.3s;
}

.cta-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    top: 25px;
    left: -2px;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s;
    max-width: calc(100% - 1.2rem - 8px);
}

.cta-link:hover {
    color: var(--color-primary);
}

.cta-link:hover::after {
    transform: translateX(10px) scale(1.2);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23007BFF" viewBox="0 0 24 24"><path d="M5 12h14M13 5l7 7-7 7"/></svg>'); /* change couleur flèche */
}

.cta-link:hover::before {
    width: calc(100% - 1.2rem - 8px);
}


/* =====================================================
    SECTION GRIDS / CARTES FLIP
   ===================================================== */
.grids {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.grid {
    width: 100%;
    max-width: 500px;
    height: 180px;
    margin: 0 auto;
    perspective: 2000px;
}

/* Petit PC : 1 colonne */
@media (max-width: 828px) {
    .grids {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 5vw, 2rem);
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
    }
    .grid {
        max-width: 450px;
    }
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;

    /* GPU */
    will-change: transform;
}

/* Flip avant */
.card-inner.flip {
    transform: rotateY(180deg);
    transition: transform 0.63s ease-out;
}

/* Flip arrière (pour garder 0.63s au retour) */
.card-inner.flipping-back {
    transition: transform 0.63s ease-out;
}

/* Hover uniquement quand pas flip */
.card-inner:not(.flip):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Grid active effect */
.grid-active .card-inner:not(.flip) {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    transition: 0.3s;
    margin: 0;
    backface-visibility: hidden;

    /* GPU */
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.card-front, .card-back {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.card-front {
    background-color: var(--color-background-1);
    position: relative;
}

.card-back {
    background-color: var(--color-background-2);
    transform: rotateY(180deg);
    color: var(--color-text);
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    line-height: clamp(1.5, 1.7, 1.9);
}


/* ---------------- */


.card-inner i.icon-service {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.card-inner h2 {
    margin-bottom: 0.5rem;
}

.card-inner p,
.card-inner h6 {
    text-align: center;
    margin: 0;
}


/* =========================
   H6 – Flip Card (complet)
   ========================= */

.card-inner h6 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);

  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
  line-height: 1.6;
}

/* Petit desktop / large tablette (>= 1000px) */
@media (min-width: 1000px) {
  .card-inner h6 {
    font-size: clamp(0.95rem, 1.25vw, 1.12rem);
  }
}

/* Desktop standard (>= 1100px) */
@media (min-width: 1100px) {
  .card-inner h6 {
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  }
}

/* Desktop large (>= 1440px) */
@media (min-width: 1440px) {
  .card-inner h6 {
    font-size: clamp(0.95rem, 0.9vw, 1.05rem);
  }
}

/* Tres grands ecrans (>= 1920px) */
@media (min-width: 1920px) {
  .card-inner h6 {
    font-size: clamp(1rem, 0.7vw, 1.05rem);
  }
}


/* CARTES */
.flip-instructions {
    text-align: center;
    font-size: 1.1rem;
    margin: 1rem auto;
    max-width: 800px;
    font-weight: 500;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

.card-front p {
    position: absolute;
    bottom: clamp(0.3rem, 2%, 0.5rem);
    right: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    color: var(--color-primary);
    text-align: right;
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: clamp(0.83rem, 1.3vw, 0.92rem);
}

.card-front p::after {
    content: "➜";
    display: inline-block;
    transition: transform 0.3s ease;
}

.card-inner:hover .card-front p {
    transform: translateX(5px);
    color: var(--color-accent);
}

.card-inner:hover .card-front p::after {
    transform: translateX(5px);
}


/* HIDDEN PART */
.show-more-wrapper {
    text-align: center;
    margin-top: 1.5rem;
}

#show-more-services {
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
}

#show-more-services:hover {
    background-color: var(--color-secondary);
    opacity: 0.9;
    color: black;
    transform: scale(1.05);
}

.extra-service {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.6s ease;
}

.extra-service.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 500px; /* ou plus selon ton contenu */
}


/* =====================================================
    BUBBLES
===================================================== */
.cta-bubbles {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(10px, 4vw, 40px);
}

.bubble {
    margin: clamp(5px, 2vw, 20px) 0;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% 60%;
    background: #f06292;
    color: var(--color-text-light);
    font-weight: 610;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow:
        0 4px 12px rgba(0,0,0,0.2),
        0 8px 20px rgba(0,0,0,0.15),
        inset -2px -2px 6px rgba(255,255,255,0.2);
    animation: bubbleColor 4s ease-in-out infinite;
}

@keyframes bubbleColor {
    0%   { filter: brightness(1) hue-rotate(0deg); }
    25%  { filter: brightness(1.1) hue-rotate(10deg); }
    50%  { filter: brightness(1.2) hue-rotate(20deg); }
    75%  { filter: brightness(1.1) hue-rotate(10deg); }
    100% { filter: brightness(1) hue-rotate(0deg); }
}

/* FIX : UNE LIGNE */
@media (min-width: 799px) {
    .cta-bubbles {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: clamp(8px, 2vw, 50px);
    }

    .bubble-group {
        display: contents;
    }
}


/* =====================================================
    FOOTER
===================================================== */
#footer {
    background-color: var(--color-background-2);
    padding: 2rem 1rem;
    color: var(--color-text-light);
    text-align: center;
}

#footer .footer-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

#footer .footer-left,
#footer .footer-right {
    display: inline-block;
    vertical-align: middle;
    margin: 0 30px;
    line-height: 1.5;
    cursor: default;
    transition: color 0.3s, transform 0.3s;
}

#footer .footer-left:hover {
    color: var(--color-primary);
    transform: scale(1.05);
}

#footer .footer-right a {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
}

#footer .footer-right a:hover {
    transform: scale(1.2) rotate(10deg);
}

@media (max-width: 800px) {
    #footer .footer-left,
    #footer .footer-right {
        display: block;
        margin: 0.5rem 0;
    }
    #footer .footer-right a {
    margin: 0 5px;
    font-size: 1.4rem;
    }
    #footer .footer-right i {
        font-size: clamp(2rem, 3.5vw, 2.8rem);
    }
}