/* ------------------------------------ */
/* Responsive global pour le site RESAAM */
/* ------------------------------------ */

html {
    font-size: 16px;
}

body {
    min-width: 320px;
    overflow-x: hidden;
}

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

main {
    width: 100%;
    overflow-x: hidden;
}

/* Conteneurs fluides */
.footer-inner,
.home-hero,
.home-about,
.home-solutions,
.chiffres-box,
.faq-section,
.contact-hero {
    width: min(100%, 1180px);
    margin-left: auto;
    margin-right: auto;
}

.home-hero,
.home-about,
.home-solutions,
.faq-section,
.contact-hero {
    padding-left: clamp(1.2rem, 3vw, 2rem);
    padding-right: clamp(1.2rem, 3vw, 2rem);
    box-sizing: border-box;
}

/* Desktop large */
@media (min-width: 1200px) {
    .home-hero {
        min-height: 92svh;
        padding-top: clamp(6rem, 8vh, 8rem);
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .home-about {
        min-height: 70svh;
        padding-top: clamp(2rem, 4vh, 3rem);
    }
}

@media (min-width: 961px) {
    .home-hero {
        overflow-x: hidden;
        overflow-y: hidden;
    }

    .home-hero-right img {
        width: 118%;
        max-width: none;
        transform: translateX(3%);
    }
}

/* Tablettes et petits écrans */
@media (max-width: 1100px) {
    .home-hero,
    .home-about {
        width: min(100%, 1000px);
        gap: 2rem;
    }

    .home-hero-left {
        flex-basis: calc(48% - 1rem);
    }

    .home-hero-right {
        flex-basis: calc(52% - 1rem);
    }

    .home-solutions,
    .faq-section {
        width: min(100%, 1000px);
    }

    .home-solutions-item,
    .home-solutions-item-reverse {
        gap: 3rem;
    }

    .chiffres-box {
        width: min(100%, 960px);
    }

    .contact-container {
        grid-template-columns: 1fr 1.2fr;
        gap: 2rem;
    }
}

@media (max-width: 960px) {
    .home-hero,
    .home-about,
    .home-solutions,
    .chiffres,
    .faq-section,
    .contact-hero {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
    }

    .home-hero,
    .home-about,
    .home-solutions-item,
    .home-solutions-item-reverse {
        flex-direction: column;
        align-items: stretch;
    }

    .home-hero {
        min-height: auto;
        padding-top: 6.5rem;
        padding-bottom: 3rem;
    }

    .home-hero-left,
    .home-hero-right,
    .home-about-left,
    .home-about-right,
    .home-solutions-item .left,
    .home-solutions-item .right,
    .home-solutions-item-reverse .left,
    .home-solutions-item-reverse .right {
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
        min-width: 0;
    }

    .home-hero h1,
    .home-about h2,
    .titles h2,
    .home-solutions-item h3,
    .home-solutions-item-reverse h3 {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .home-hero h1 br,
    .home-about h2 br,
    .titles h2 br,
    .home-solutions-item h3 br,
    .home-solutions-item-reverse h3 br {
        display: none;
    }

    .home-about-right {
        justify-content: center;
    }

    .home-solutions-items {
        gap: 4rem;
    }

    .titles {
        margin: 4rem 0 2rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chiffres-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        height: auto;
        display: grid;
        gap: 1rem;
    }

    .faq-section {
        padding: 4rem 1.5rem;
    }

    .contact-hero {
        padding: 7rem 1.5rem 3rem;
    }

    .contact-hero .p1 {
        width: 100%;
    }

    .contact-section {
        padding: 3rem 1.5rem 4rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Mobiles */
@media (max-width: 760px) {
    .home-hero {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .home-hero h1,
    .home-about h2,
    .titles h2,
    .home-solutions-item h3,
    .home-solutions-item-reverse h3 {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
        line-height: 1.15;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .home-hero p,
    .home-about p,
    .titles p,
    .home-solutions-item p,
    .home-solutions-item-reverse p {
        font-size: 1rem;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    .partners-section {
        height: auto;
        padding: 2rem 1rem;
    }

    .partner-logo {
        margin-right: 2rem;
        font-size: 12px;
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-inner {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: .6rem;
    }

    .chiffres {
        min-height: auto;
        padding: 3rem 1rem;
    }

    .chiffres-box {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .faq-question {
        padding: 1.1rem 1.25rem;
        gap: 1rem;
    }

    .faq-question-text {
        font-size: 14.5px;
    }

    .faq-answer-inner {
        padding: 0 1.25rem 1.25rem;
    }

    .contact-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
        line-height: 1.15;
    }

    .contact-form {
        padding: 1.75rem;
    }

    .contact-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .logo,
    .footer-logo {
        font-size: 15px;
    }

    .logo-img,
    .footer-logo-img {
        width: 30px;
        height: 30px;
    }

    .home-hero,
    .home-about,
    .home-solutions,
    .chiffres,
    .faq-section,
    .contact-hero {
        padding-left: 0.95rem;
        padding-right: 0.95rem;
    }

    .home-hero h1,
    .home-about h2,
    .titles h2 {
        font-size: 1.7rem;
    }

    .button,
    .button-blue,
    .button-white,
    .button-transparent,
    .button-white-fleche {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .contact-info-item {
        padding: 1.1rem;
    }
}

/* Adaptation pour écrans très hauts */
@media (min-height: 900px) {
    .home-hero {
        min-height: 82svh;
    }
}

@media (max-height: 780px) {
    .home-hero {
        min-height: auto;
        padding-top: 5.5rem;
        padding-bottom: 2rem;
    }

    .home-about {
        min-height: auto;
        padding-top: 2rem;
    }
}

@media (max-width: 600px) {
    .dark-securite {
        padding: 4rem 1.5rem;
    }

    .securite-grid {
        margin-top: 2rem;
    }

    .dark-securite h2 {
        font-size: 28px;
        line-height: 2.2rem;
    }
}

@media (max-width: 1024px) {
    .faq {
        width: 85vw;
    }
}

@media (max-width: 768px) {
    .faq {
        width: 90vw;
        padding: 4rem 0;
    }

    .faq-question {
        font-size: 14.5px;
        padding: 1.2rem 0;
        gap: 1rem;
    }

    .faq-answer p {
        font-size: 14px;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .faq-filter {
        font-size: 12.5px;
        padding: .5rem 1rem;
    }
    
    .faq-question span:first-child {
        line-height: 1.4rem;
    }
}

@media (max-width: 768px) {
    .cta-contact {
        padding: 4rem 1.25rem;
    }

    .cta-contact-header h2 {
        font-size: 32px;
    }

    .cta-form-card {
        padding: 1.75rem;
    }

    .cta-form-row {
        flex-direction: column;
        gap: 1.25rem;
    }
}

@media (max-width: 960px) {
    .about-hero {
        min-height: auto;
        padding: 8rem 1.5rem 3rem;
    }

    .about-hero h1 {
        max-width: 100%;
    }

    .about-hero h1 br {
        display: none;
    }

    .about-hero .p1 {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .about-hero {
        padding: 7rem 1.25rem 2.5rem;
        gap: .75rem;
    }

    .about-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
        line-height: 1.15;
    }

    .about-hero .p1 {
        font-size: 15px;
        line-height: 1.6rem;
    }

    .about-hero .p1 br {
        display: none;
    }
}

@media (max-width: 480px) {
    .about-hero {
        padding: 6.5rem 1rem 2rem;
    }
}

@media (max-width: 960px) {
    .about-story-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 3rem;
    }

    .story-left h2 {
        max-width: 100%;
    }
}

@media (max-width: 760px) {
    .about-story {
        padding: 3.5rem 1rem;
    }

    .about-story-inner {
        gap: 2.5rem;
    }

    .timeline {
        gap: 2rem;
        padding-left: 1.5rem;
    }

    .timeline::before {
        left: 4px;
    }

    .timeline-dot {
        left: -1.5rem;
    }

    .timeline-title {
        font-size: 17px;
    }

    .timeline-text {
        max-width: 100%;
    }
}

@media (max-width: 960px) {
    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .mission {
        padding: 3.5rem 1rem;
    }

    .mission-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .mission .titles h2 br {
        display: none;
    }
}

@media (max-width: 960px) {
    .valeurs-box {
        grid-template-columns: repeat(2, 1fr);
    }

    .valeurs-box-element:nth-child(3) {
        border-left: none;
    }

    .valeurs-box-element:nth-child(2),
    .valeurs-box-element:nth-child(4) {
        border-left: solid 1px #6670854D;
    }
}

@media (max-width: 760px) {
    .valeurs {
        padding: 3.5rem 1rem;
    }

    .valeurs .titles h2 br {
        display: none;
    }

    .valeurs-box {
        grid-template-columns: 1fr;
    }

    .valeurs-box-element {
        border-left: none !important;
        border-top: solid 1px #6670854D;
    }

    .valeurs-box-element:first-child {
        border-top: none;
    }
}

@media (max-width: 760px) {
    .faq-hero {
        padding: 7rem 1.25rem 3rem;
    }

    .faq-filters {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        flex-wrap: nowrap;
        margin: 0 -1.25rem 2.5rem;
        padding: 0 1.25rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
        mask-image: linear-gradient(90deg, transparent, black 4%, black 92%, transparent);
        -webkit-mask-image: linear-gradient(90deg, transparent, black 4%, black 92%, transparent);
    }

    .faq-filters::-webkit-scrollbar {
        display: none;
    }

    .faq-filter {
        flex-shrink: 0;
        white-space: nowrap;
        scroll-snap-align: start;
    }
}

@media (max-width: 960px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 760px) {
    .contact-hero {
        padding: 7rem 1.25rem 3rem;
    }

    .contact-section {
        padding: 3rem 1.25rem;
    }

    .contact-info h2 {
        font-size: 26px;
    }

    .cta-form-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    .profile-select {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        padding: 1.5rem;
    }

    .contact-modal {
        padding: 1.75rem;
    }
}

/* =======================================================
   PAGE SOLUTIONS — UPH — RESPONSIVE (à coller en fin de responsive.css)
   ======================================================= */

@media (max-width: 1100px) {
    .solutions-tabs-section {
        width: min(100%, 1000px);
    }
}

@media (max-width: 960px) {
    .solutions-hero {
        min-height: auto;
        padding: 7rem 1.5rem 3rem;
    }

    .solutions-panel {
        padding: 2rem;
    }

    .solutions-panel-grid {
        flex-direction: column;
    }

    .solutions-panel-visual {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .solutions-hero {
        padding: 6.5rem 1.25rem 2.5rem;
    }

    .solutions-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
        line-height: 1.15;
    }

    .solutions-hero .p1 {
        font-size: 15px;
        line-height: 1.6rem;
    }

    .solutions-tabs-section {
        padding: 3.5rem 1.25rem;
    }

    .solutions-tabbar {
        flex-wrap: wrap;
        margin-bottom: 2.5rem;
    }

    .solutions-tabbtn {
        font-size: 13px;
        padding: .7rem 1.1rem;
    }

    .solutions-panel {
        padding: 1.5rem;
    }

    .solutions-panel-left h3 {
        font-size: 22px;
    }

    .solutions-visual-row,
    .solutions-visual-row-2x2 {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .solutions-hero {
        padding: 6rem 1rem 2rem;
    }

    .solutions-tabs-section {
        padding: 3rem 0.95rem;
    }

    .solutions-panel {
        padding: 1.25rem;
    }

    .solutions-tabbar {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .solutions-tabbtn {
        width: 100%;
    }

    .solutions-visual-row,
    .solutions-visual-row-2x2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .partner-logo {
        height: 30px;
        margin-right: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .legal-wrapper {
        gap: 2.5rem;
    }
 
    .legal-toc {
        flex: 0 0 220px;
    }
}
 
/* Tablette / petit écran (≤ 900px) : sommaire passe au-dessus, non sticky */
@media (max-width: 900px) {
    .legal-hero {
        padding: 7rem 1.5rem 2.5rem;
        min-height: auto;
    }
 
    .legal-section {
        padding: 3rem 1.5rem 4rem;
    }
 
    .legal-wrapper {
        flex-direction: column;
        gap: 2rem;
    }
 
    .legal-toc {
        position: static;
        top: auto;
        flex: 1 1 auto;
        width: 100%;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: .25rem;
    }
 
    .legal-toc-title {
        grid-column: 1 / -1;
    }
 
    .legal-content {
        gap: 2rem;
    }
}
 
/* Mobile (≤ 600px) */
@media (max-width: 600px) {
    .legal-hero {
        padding: 6rem 1.25rem 2rem;
        gap: .75rem;
    }
 
    .legal-hero h1 {
        font-size: 1.6rem;
        max-width: 100%;
    }
 
    .legal-hero .p1 {
        font-size: 14px;
    }
 
    .legal-updated {
        font-size: 11px;
        text-align: left;
        padding: .4rem .9rem;
    }
 
    .legal-section {
        padding: 2rem 1.25rem 3rem;
    }
 
    .legal-toc {
        grid-template-columns: 1fr;
        padding: 1.1rem;
    }
 
    .legal-toc a {
        padding: .5rem;
        font-size: 13px;
    }
 
    .legal-block h2 {
        font-size: 18px;
        flex-wrap: wrap;
        gap: .4rem;
        scroll-margin-top: 5.5rem;
    }
 
    .legal-block h3 {
        font-size: 15px;
        scroll-margin-top: 5.5rem;
    }
 
    .legal-block p,
    .legal-block ul li {
        font-size: 14px;
        line-height: 1.7;
    }
 
    .legal-intro {
        font-size: 14.5px;
        max-width: 100%;
    }
 
    .legal-contact-box {
        padding: 1.25rem;
    }
}

@media (max-width: 992px) {
    .hero-features {
        flex-direction: column;
        width: 100%;
        max-width: 450px;
    }

    .hero-feature {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
        min-width: auto;
    }

    .hero-feature:last-child {
        border-bottom: none;
    }
}
