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

body {
    font-family: 'Arial', sans-serif;
    background-color: #222;
    color: #fff;
    opacity: 1;
    transform: none;
    transition: background-color 0.45s ease, color 0.45s ease, opacity 0.65s ease, transform 0.65s ease;
}

body:not(.page-ready) {
    opacity: 0;
    transform: translateY(10px);
}

/* ------------------ HEADER ------------------ */

/* Empêcher le téléphone et le bouton thème de se chevaucher */
header {
    gap: 20px !important;
}

/* Séparation visuelle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-contact-btn {
    margin-right: 0;
    position: relative;
    z-index: 2000;
}

/* Bouton thème au-dessus */
.theme-toggle {
    margin-left: 0 !important;
    z-index: 2002 !important;
}



header {
    width: 100%;
    padding: 15px 50px;
    position: fixed;
    top: -100px; /* Animation au chargement */
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

header.show { top: 0; }


/* Logo */
.logo {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    color: #ff6600;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.25s ease, text-shadow 0.25s ease, color 0.25s ease;
}

.logo:hover {
    transform: translateY(-2px);
    text-shadow: 0 6px 14px rgba(255, 102, 0, 0.28);
    color: #e65c00;
}

/* Menu desktop */
.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: orange;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ------------------ BOUTON TÉLÉPHONE (HEADER) ------------------ */
.header-contact-btn .phone-icon {
    pointer-events: auto;
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, #ff7a1a, #e65c00);
    box-shadow: 0 10px 20px rgba(230, 92, 0, 0.34);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-contact-btn .phone-icon::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 122, 26, 0.35);
    animation: phonePulse 2s infinite;
    pointer-events: none;
}

@keyframes phonePulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.header-contact-btn .phone-icon:hover,
.header-contact-btn .phone-icon:focus-within {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 14px 25px rgba(230, 92, 0, 0.42);
}

.header-contact-btn .phone-icon .phone-number {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(10px) scale(0.97);
    opacity: 0;
    white-space: nowrap;
    background: #fff;
    color: #e65c00;
    border: 1px solid rgba(230, 92, 0, 0.22);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
    pointer-events: none;
    display: inline-block;
    z-index: 10;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.header-contact-btn .phone-icon:hover .phone-number,
.header-contact-btn .phone-icon:focus-within .phone-number {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
    pointer-events: auto;
}

.header-contact-btn .phone-icon .phone-number:hover {
    background: #fff4ea;
}

.hero-contact-btn .phone-number {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #ff6600;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}


/* ------------------ THEME JOUR / NUIT ------------------ */
.theme-toggle {
    width: 78px;
    height: 42px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffd35a, #ff9f1a);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.35), 0 8px 16px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.35s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.35), 0 12px 20px rgba(0, 0, 0, 0.2);
}

.theme-option {
    font-size: 16px;
    position: relative;
    z-index: 2;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
}

.theme-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fffdf7;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.35s ease;
    z-index: 1;
}

body.light .sun-option { opacity: 1; transform: scale(1.12); }
body.light .moon-option { opacity: 0.45; transform: scale(0.88); }
body.dark .sun-option { opacity: 0.45; transform: scale(0.88); }
body.dark .moon-option { opacity: 1; transform: scale(1.12); }
body.dark .theme-toggle {
    background: linear-gradient(135deg, #111827, #374151);
}
body.dark .theme-thumb {
    transform: translateX(36px);
    background: #d2d9e8;
}

.theme-toggle:active .theme-thumb {
    transform: scale(0.92);
}

body.dark .theme-toggle:active .theme-thumb {
    transform: translateX(36px) scale(0.92);
}

body.light { background: #ffffff; color: #222; }
body.dark { background: #222; color: #ffffff; }

body.light .faq-answer {
  color: #555;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------ HAMBURGER / MOBILE ------------------ */
.hamburger {
    display: none;
    width: 35px;
    height: 26px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2001;
}

.hamburger span {
    display: block;
    height: 4px;
    border-radius: 5px;
    width: 100%;
    background: #ff6600;
    transition: 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translateY(10px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translateY(-10px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    right: -100%;
    width: 70%;
    height: calc(100vh - 70px);
    background: #222;
    padding-top: 40px;
    transition: 0.4s ease;
    z-index: 2000;
}

.mobile-menu.open { right: 0; display: block; }

.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { margin: 25px 0; text-align: center; }
.mobile-menu a { color: white; font-size: 22px; text-decoration: none; transition: color 0.3s ease; }
.mobile-menu a:hover { color: #ff6600; }

/* ------------------ POP-UP TÉLÉPHONE ------------------ */

/* ================= DESACTIVER ANIMATION TELEPHONE SUR MOBILE ================= */
@media screen and (max-width: 768px) {

    /* Désactive le hover et le déplacement de l’icône */
    .header-contact-btn .phone-icon:hover {
        transform: none !important;
    }

    .header-contact-btn .phone-icon::after {
        display: none;
    }

    /* Empêche l’apparition de la bulle du numéro au survol */
    .header-contact-btn .phone-icon .phone-number {
        opacity: 0 !important;
        transform: translateY(-50%) translateX(0) scale(1) !important;
        transition: none !important;
        background: transparent !important;
        padding: 0 !important;
        color: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .header-contact-btn .phone-icon:hover .phone-number {
        opacity: 0 !important;
    }

    /* ------------------ POP-UP MOBILE ------------------ */
    .phone-popup .popup-content .phone-number,
    .phone-popup .popup-content .call-btn {
        text-decoration: none !important; /* supprime le soulignement */
        color: #fff !important;        /* couleur uniforme */
        font-weight: bold;
        cursor: pointer;                  /* indique que c’est cliquable */
        display: block;
        margin-bottom: 20px;
        font-size: 18px;
    }

    /* Hover sur le bouton */
    .phone-popup .popup-content .call-btn:hover {
        background: #e65c00;
        color: #fff;
    }
}

/* ------------------ POP-UP GLOBAL ------------------ */
.phone-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-popup .popup-content {
    background: #222;
    padding: 30px 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 300px;
    animation: popupShow 0.4s ease;
}

.phone-popup .popup-content h3 { 
    color: #ff6600; 
    margin-bottom: 15px; 
}

.phone-popup .popup-content .call-btn {
    display: inline-block;
    background: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.phone-popup .popup-content .call-btn:hover { 
    background: #e65c00; 
}

@keyframes popupShow { 
    0% { transform: scale(0.5); opacity: 0; } 
    100% { transform: scale(1); opacity: 1; } 
}


/* ------------------ HERO SECTION ------------------ */
.hero-section {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)),
        url('Image/Background/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    text-align: center;
    color: #ff6600;
}

/* ===================== LOGO ANIMÉ ===================== */
.hero-logo {
    width: 50px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;

    /* Animation combinée */
    animation: floatLogo 4s ease-in-out infinite,
               glowPulse 3s ease-in-out infinite;
}

/* Animation de flottaison */
@keyframes floatLogo {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

/* Animation du halo lumineux */
@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 0px rgba(255, 102, 0, 0.0));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(255, 102, 0, 0.6));
    }
    100% {
        filter: drop-shadow(0 0 0px rgba(255, 102, 0, 0.0));
    }
}

/* Mobile: logo plus petit */
@media screen and (max-width: 480px) {
    .hero-logo {
        width: 50px;
    }
}



.hero-section h1 {
    font-size: 48px;
    font-family: 'Great Vibes', cursive;
    padding: 20px 40px;
}

.hero-paragraphe {
    font-size: 1rem;
    color: #fff;
    margin-top: 5px;
    text-align: center;
    padding: 10px 8px;
}

/* ------------------ SERVICES / ICONS ------------------ 
.services {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    flex-wrap: wrap;
    padding-bottom: 30px;
}

.service-item {
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
    animation: rotateBounce 0.8s ease;
    padding: 20px;
    border-radius: 10px;
    background-color: #f5f5f5;
}

.service-item i {
    font-size: 50px;
    color: #ff6600;
    transition: transform 0.6s ease;
    display: block;
    margin-bottom: 10px;
}

.service-item span {
    font-size: 16px;
    font-weight: bold;
}

.service-item:hover i { transform: rotate(360deg); }
.service-item:hover { transform: scale(1.1); background-color: #e6f0ff; }

@keyframes rotateBounce {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(360deg) scale(1.2); }
    70% { transform: rotate(360deg) scale(0.9); }
    100% { transform: rotate(360deg) scale(1); }
}
*/

/* ------------------ PRESTATIONS / CARTES ------------------ */
.prestations-section {
    position: relative;
    padding: 60px 20px;
    text-align: center;
    background: #222;
}

.prestations-section h2 {
    font-size: 36px;
    font-family: 'Great Vibes', cursive;
    margin-bottom: 40px;
    color: #e65c00;
}

.prestations-container {
    display: flex;
    gap: 30px;
    overflow-x: auto;              /* Scroll horizontal activé */
    overflow-y: hidden;            /* Pas de scroll vertical */
    scroll-snap-type: x mandatory;
    padding-bottom: 30px;          /* Espace pour voir scrollbar */
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scroll mobile */
}

/* Scrollbar personnalisée pour desktop */
.prestations-container::-webkit-scrollbar {
    height: 10px;
}

.prestations-container::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 5px;
}

.prestations-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.scroll-progress-container {
    position: relative;
    width: 90%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 15px auto 0;
    overflow: hidden;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e65c00, #ff9f1a);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.prestation-card {
    flex: 0 0 23%;
    min-width: 280px;
    height: 350px;
    border-radius: 30px 10px 30px 10px;
    background-image: var(--card-bg-image, url('Image/Background/background.png'));
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.6s, box-shadow 0.6s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), 0 0 15px rgba(255,102,0,0.3) inset;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    scroll-snap-align: start;
    text-decoration: none;
}

.card-plomberie { --card-bg-image: url('Image/plomberie/cuivre.jpeg'); }
.card-electricite { --card-bg-image: none; background-color: #4a4a4a; }
.card-carrelage { --card-bg-image: url('Image/carrelage/carrelage.jpeg'); }
.card-chauffage { --card-bg-image: url('Image/chaudière/Condensation/condensat-apres1.JPG'); }
.card-cuisine { --card-bg-image: url('Image/cuisine/cuisine-1.jpeg'); }
.card-peinture { --card-bg-image: none; background-color: #505050; }

.prestation-card:hover {
    transform: rotateY(15deg) rotateX(5deg) translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255,102,0,0.6) inset;
}

.prestation-card img {
    width: 120%;
    margin-left: -10%;
    height: 140px;
    object-fit: cover;
    clip-path: polygon(0 0, 100% 5%, 100% 85%, 0 100%);
    transition: transform 0.7s, clip-path 0.7s;
}

.prestation-card:hover img {
    transform: scale(1.15) rotate(-2deg);
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
}

.prestation-card-content {
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* centre verticalement le contenu */
    align-items: center;      /* centre horizontalement le contenu */
    height: 210px;
    text-align: center;       /* centre le texte */
}

.prestation-card h3 {
    font-size: 1.4em;
    font-weight: bold;
    color: #ff6600;
    margin: 0;
    text-decoration: none;
}


.prestation-card p {
    font-size: 0.9em;
    color: #eee;
    opacity: 0.8;
    transition: opacity 0.5s, transform 0.5s;
    text-align: center;       /* centre le texte */
}

.prestation-card:hover p {
    opacity: 1;
    transform: translateY(-5px);
}

.prestation-card-footer {
    font-weight: bold;
    color: #ff6600;
    font-size: 1.1em;
    padding: 5px 12px;
    border-radius: 12px;
    background-color: #111;
    box-shadow: 0 0 15px #ff6600;
    align-self: flex-start;
    transition: transform 0.5s, box-shadow 0.5s;
}

.prestation-card:hover .prestation-card-footer {
    transform: scale(1.1);
    box-shadow: 0 0 25px #ff6600;
}



/* ------------------ VIDEOS / CARROUSEL ------------------ */
.videos-section {
    padding: 60px 20px;
    background: #1d1d1d;
    text-align: center;
}

.videos-section-header {
    max-width: 900px;
    margin: 0 auto 30px;
}

.videos-section h2 {
    font-size: 36px;
    font-family: 'Great Vibes', cursive;
    margin-bottom: 12px;
    color: #e65c00;
}

.videos-section-header p {
    color: #f2f2f2;
    line-height: 1.5;
}

.videos-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 980px;
    margin: 0 auto;
}

.videos-track-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
}

.videos-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}

.video-slide {
    min-width: 100%;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(145deg, #303030, #1f1f1f);
    border: 1px solid rgba(255, 102, 0, 0.28);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: center;
    text-align: left;
}

.video-media {
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
}

.video-media video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 360px;
    object-fit: contain;
    background: #000;
}

.video-slide-content h3 {
    color: #ff6600;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.video-slide-content p {
    color: #f2f2f2;
    line-height: 1.5;
}

.video-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #ff6600;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.video-nav:hover {
    background: #e65c00;
    transform: scale(1.08);
}

.video-dots {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.video-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.video-dot.active {
    background: #ff6600;
    transform: scale(1.2);
}

body.light .videos-section {
    background: #f6f6f6;
}

body.light .videos-section-header p {
    color: #333;
}

body.light .video-slide {
    background: linear-gradient(145deg, #ffffff, #ececec);
    border-color: rgba(255, 102, 0, 0.22);
}

body.light .video-slide-content p {
    color: #333;
}

body.light .video-dot {
    background: rgba(34, 34, 34, 0.25);
}

/* ------------------ CERTIFICATIONS ------------------ */
.certif-section {
    padding: 60px 20px;
    background: #222;
    text-align: center;
}

.certif-section h2 {
    font-size: 36px;
    font-family: 'Great Vibes', cursive;
    margin-bottom: 20px;
    color: #e65c00;
}

.certif-text {
    font-size: 18px;
    color: #fff;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

.certif-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.certif-logos img {
    max-width: 120px;
    height: auto;
    transition: transform 0.6s ease, opacity 0.6s ease;
    cursor: pointer;
    transform: translateY(30px);
}

.certif-logos img:hover { transform: scale(1.1); }
.certif-logos img.visible { opacity: 1; transform: translateY(0); }

/* ------------------ FICHE ETABLISSEMENT ------------------ */
.etablissement-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #2a2a2a, #1c1c1c);
}

.etablissement-card {
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid rgba(255, 102, 0, 0.28);
    border-radius: 20px;
    padding: 30px 24px;
    background: rgba(0, 0, 0, 0.34);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
    text-align: center;
}

.etablissement-card h2 {
    font-size: 34px;
    font-family: 'Great Vibes', cursive;
    margin-bottom: 12px;
    color: #ff6600;
}

.etablissement-card p {
    color: #f2f2f2;
    line-height: 1.6;
    margin-bottom: 18px;
}

.etablissement-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    background: #ff6600;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.etablissement-link:hover {
    background: #e65c00;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(230, 92, 0, 0.3);
}

body.light .etablissement-section {
    background: #f5f5f5;
}

body.light .etablissement-card {
    background: #fff;
    border-color: rgba(255, 102, 0, 0.22);
}

body.light .etablissement-card p {
    color: #333;
}

/* ------------------ FAQ ------------------ */
.faq {
    width: 100%;
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
}

.faq-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    color: #ff6600;
    font-family: 'Great Vibes', cursive ;
}

.faq-item {
    border-bottom: 1px solid #555;
    padding: 15px 0;
    color: #fff;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 20px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e65c00;
}

.faq-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
    color: #e65c00;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.5;
    transition: max-height 0.35s ease;
}

.faq-item.active .faq-answer { max-height: 300px; }
.faq-item.active .faq-icon { transform: rotate(45deg); }

/* ------------------ FOOTER ------------------ */
.site-footer {
    background-color: #222;
    color: #fff;
    padding: 50px 20px 20px 20px;
    font-family: Arial, sans-serif;
}

.footer-contact a {
    color: #ff6600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #e65c00;
}


.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-container h3 { margin-bottom: 15px; font-size: 20px; color: #ff6600; }
.footer-container p,
.footer-container a { color: #fff; text-decoration: none; margin-bottom: 10px; }

.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a:hover { color: #ff6600; }



.footer-newsletter {
  margin-top: 30px;
}
.footer-newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.footer-newsletter input[type="email"] {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  flex: 1 1 200px;
}
.footer-newsletter button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #ff6600;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
.footer-newsletter button:hover {
  background-color: #e65c00;
}

/* Messages de retour */
.footer-newsletter .form-success,
.footer-newsletter .form-error {
  display: none;
  margin-top: 10px;
  text-align: center;
}
.footer-newsletter .form-success {
  color: #4CAF50;
}
.footer-newsletter .form-error {
  color: #f44336;
}

/* ------------------ FOOTER BOTTOM ------------------ */
.footer-bottom {
    width: 100%;
    padding: 20px 0;
    background-color: #222;
    color: #fff;
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center;     /* Centre verticalement */
    gap: 10px;               /* Espace entre texte et liens */
    flex-wrap: wrap;          /* Permet au contenu de rester sur une ligne ou se wrap sur mobile si nécessaire */
    text-align: center;
    font-size: 14px;
}

.footer-bottom a {
    color: #ff6600;
    text-decoration: none;
    margin: 0 5px; /* Espace entre les liens */
    white-space: nowrap; /* Empêche les liens de passer à la ligne */
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #e65c00;
}

/* Version responsive : mobile */
@media screen and (max-width: 768px) {
    .footer-bottom {
        flex-direction: column; /* Met les éléments l'un en dessous de l'autre si nécessaire */
        gap: 5px;
        font-size: 13px;
    }

    .footer-bottom a {
        margin: 0 5px; /* Garde les liens sur la même ligne si possible */
    }
}






/* ------------------ COOKIE CONSENT ------------------ */

.cookie-consent {
    display: none; /* cacher par défaut */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 5000;
    max-width: 400px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cookie-consent.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cookie-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.cookie-buttons button {
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.cookie-buttons button#accept-cookies {
    background: #ff6600;
    color: #fff;
}

.cookie-buttons button#accept-cookies:hover {
    background: #e65c00;
}

.cookie-buttons button#decline-cookies {
    background: #555;
    color: #fff;
}

.cookie-buttons button#decline-cookies:hover {
    background: #333;
}

/* ================= WIDGET URGENCE ================= */

/* Couche flottante globale: reste utilisable en permanence */
.floating-layer {
    position: fixed !important;
    pointer-events: auto;
    isolation: isolate;
    transform: translateZ(0);
}

/* Container principal du widget */
#urgence-widget {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 20px; /* placé à gauche */
    width: 260px;
    background: #222; /* turquoise du site */
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    z-index: 2147483000;
    font-family: 'Arial', sans-serif;
    color: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Bouton fermer (croix) */
#urgence-close {
    align-self: flex-end;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.2s ease;
}

#urgence-close:hover {
    color: #ffd700; /* effet doré au survol */
}

/* Bouton appeler */
#urgence-call {
    margin-top: 12px;
    padding: 12px 0;
    border-radius: 14px;
    border: none;
    background-color: #8e0000;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

#urgence-call:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    background-color: #8e0000;
}

/* ================= MINI BOUTON ================= */

/* Mini bouton rebond */
#urgence-mini-btn {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 20px;
    background-color: #e65c00;
    color: #fff;
    font-weight: bold;
    border-radius: 50px;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    z-index: 2147482999;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    animation: bounceMini 2s infinite;
}

/* Hover mini bouton */
#urgence-mini-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    background-color: #8e0000;
}

/* Effet rebond */
@keyframes bounceMini {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-5px); }
}

/* Espace entre le titre et le paragraphe dans le widget urgence */
#urgence-widget h3 {
    margin-bottom: 12px; /* Ajuste la valeur selon l'espace souhaité */
}

#urgence-widget p {
    margin-top: 0; /* pour éviter un double espace si nécessaire */
}



/* ------------------ CHAT WIDGET ------------------ */
#chat-widget {
    display: none; /* caché par défaut */
    position: fixed;
    bottom: calc(86px + env(safe-area-inset-bottom));
    right: 20px;
    width: 300px;
    max-width: 90%;
    background: #222;
    color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2147482901;
    flex-direction: column;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#chat-widget #chat-header {
    background: #ff6600;
    padding: 12px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#chat-widget #chat-header span { font-weight: bold; }
#chat-widget #chat-header button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

#chat-widget #chat-body {
    padding: 10px 15px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.4;
}

#chat-widget #chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #444;
    gap: 5px;
}

#chat-widget #chat-footer input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
}

#chat-widget #chat-footer button {
    background: #ff6600;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

#chat-widget #chat-footer button:hover { background: #e65c00; }

/* Bouton flottant pour ouvrir/fermer le chat */
#chat-toggle {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    z-index: 2147482902;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    background: #ff6600;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

#chat-toggle:hover { transform: scale(1.1); }




/* ------------------ RESPONSIVE ------------------ */
@media screen and (max-width: 1024px) {
    .prestations-container { flex-wrap: nowrap; gap: 20px; }
    .prestations-section h2 { font-size: 28px; }
    .video-slide { grid-template-columns: 1fr; text-align: center; }
    .video-slide-content { text-align: center; }
    .video-media video { max-height: 320px; }
}

@media screen and (max-width: 768px) {
    header { padding: 10px 20px; }
    .nav-menu { display: none; }
    .hamburger { display: flex; }
    .hero-section h1 { font-size: 32px; }
    .hero-paragraphe { font-size: 16px; }
    .prestations-container { overflow-x: scroll; }
    .services { flex-direction: column; gap: 20px; }
    .certif-logos { gap: 20px; }
    .videos-section h2 { font-size: 30px; }
    .videos-carousel { gap: 10px; }
    .video-nav { width: 38px; height: 38px; font-size: 1.4rem; }
    .video-media video { max-height: 260px; }
    .etablissement-card h2 { font-size: 30px; }
}

@media screen and (max-width: 480px) {
    .hero-section h1 { font-size: 24px; }
    .prestation-card { flex: 0 0 80%; min-width: 220px; }
    .faq-title { font-size: 28px; }
    .footer-container { flex-direction: column; gap: 20px; text-align: center; }
    .video-slide { padding: 16px; }
    .video-nav { display: none; }
    .video-media video { max-height: 220px; }
    .etablissement-card { padding: 22px 16px; }
    .etablissement-card h2 { font-size: 26px; }
}

/* ------------------ RESPONSIVE HARDENING ------------------ */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
}

@media screen and (max-width: 1024px) {
    header {
        gap: 12px !important;
        padding: 12px 22px;
    }

    .logo {
        font-size: 1.7rem;
    }
}

@media screen and (max-width: 768px) {
    header {
        gap: 8px !important;
        padding: 10px 12px !important;
    }

    .logo {
        font-size: 1.45rem;
        max-width: 45vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-actions {
        gap: 6px;
    }

    .header-contact-btn .phone-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .theme-toggle {
        width: 64px;
        height: 36px;
        padding: 0 8px;
    }

    .theme-thumb {
        width: 28px;
        height: 28px;
        top: 4px;
        left: 4px;
    }

    body.dark .theme-thumb {
        transform: translateX(28px);
    }

    .hamburger {
        width: 30px;
        height: 22px;
    }

    .mobile-menu {
        width: min(82vw, 340px);
        top: 64px;
        height: calc(100vh - 64px);
    }

    .cookie-consent {
        width: calc(100vw - 24px);
        max-width: 400px;
        bottom: 12px;
        padding: 16px 18px;
    }

    #urgence-widget {
        width: min(260px, calc(100vw - 24px));
        left: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    #urgence-mini-btn {
        left: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        padding: 12px 22px;
    }

    #chat-widget {
        width: min(330px, calc(100vw - 24px));
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom));
    }

    #chat-toggle {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: 50px;
        height: 50px;
    }

    .faq {
        margin: 56px auto;
        padding: 0 14px;
    }
}

@media screen and (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
        max-width: 40vw;
    }

    .mobile-menu {
        width: 100%;
        top: 60px;
        height: calc(100vh - 60px);
    }

    #urgence-widget {
        left: 10px;
        right: 10px;
        width: auto;
    }

    #chat-widget {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
    }
}
