/* ============================================
   1. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ============================================
   2. TYPOGRAPHIE GLOBALE
   ============================================ */
h2 {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    margin-bottom: 20px;
    word-wrap: break-word;
}

p {
    font-family: 'Inter', sans-serif;
    word-wrap: break-word;
    line-height: 1.6;
}

h5 {
    word-wrap: break-word;
}

/* ============================================
   3. COMPOSANTS GLOBAUX
   ============================================ */
.section {
    padding: 80px 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Bouton principal */
.btn-primary {
    background: #1f7a3a;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #155d2c;
    transform: scale(1.05);
}

/* Cartes */
.card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-radius: 15px;
    transition: 0.3s;
    height: 100%;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
}

.card img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Boîtes technologies */
.tech-box {
    padding: 20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    height: 100%;
}

.tech-logo {
    height: 60px;
    width: auto;
    margin: 10px;
    display: inline-block;
    vertical-align: middle;
}

/* Footer */
footer {
    background: #0a2540;
    color: white;
    padding: 40px 20px;
}

footer a {
    color: #1f7a3a;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #26a54a;
}

/* Formulaire */
form {
    max-width: 100%;
    width: 100%;
}

form input,
form textarea {
    font-size: 16px;
}

#contact a {
    text-decoration: none;
    color: #1f7a3a;
    font-weight: 500;
}

/* ============================================
   4. NAVIGATION
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.10);
    padding: 10px 40px;
}

#navbar .nav-logo img {
    height: 40px;
    transition: height 0.3s;
}

#navbar.scrolled .nav-logo img {
    height: 34px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    color: #0b1c39;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3aaa35;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: #3aaa35;
}

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

/* Nav CTA */
.nav-cta {
    background: #3aaa35;
    color: white !important;
    padding: 8px 20px;
    border-radius: 25px;
    transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover {
    background: #2c8a29 !important;
    transform: scale(1.04);
}

.nav-cta::after {
    display: none !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #0b1c39;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

#navbar.scrolled .hamburger span {
    background: #0b1c39;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 28, 57, 0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-menu.open {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: 'Sora', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
    opacity: 0;
    transform: translateY(20px);
    animation: menuItemIn 0.4s forwards;
}

.mobile-menu a:hover {
    color: #3aaa35;
}

.mobile-menu a:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu a:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu a:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu a:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu a:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu a:nth-child(6) { animation-delay: 0.3s; }
.mobile-menu a:nth-child(7) { animation-delay: 0.35s; }

@keyframes menuItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   5. HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url("../image/couverture.png") no-repeat right center/cover;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0.92) 45%, transparent 75%);
    z-index: 0;
}

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

.hero-content {
    max-width: 55%;
}

/* Logo en haut */
.logo-top {
    position: absolute;
    top: 10px;
    left: 40px;
}

.logo-top img {
    height: 45px;
}

/* Titre hero */
.hero h1 {
    font-family: 'Sora', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: #0b1c39;
    line-height: 1.15;
    word-wrap: break-word;
    overflow: hidden;
}

.hero h1 span {
    color: #3aaa35;
}

.hero h1 .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    animation: wordReveal 0.6s forwards;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p {
    font-size: 1.1rem;
    margin-top: 15px;
    color: #555;
}

/* Badge hero */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(58, 170, 53, 0.1);
    color: #2c8a29;
    font-family: 'Sora', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 18px;
    opacity: 0;
    animation: wordReveal 0.5s 0.2s forwards;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #3aaa35;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(58, 170, 53, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(58, 170, 53, 0);
    }
}

/* Verset stylé */
.verse {
    margin-top: 40px;
    padding: 20px 24px;
    border-left: 3px solid #3aaa35;
    font-style: italic;
    color: #444;
    background: rgba(58, 170, 53, 0.05);
    border-radius: 0 10px 10px 0;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: verseIn 1s 1.4s forwards;
}

@keyframes verseIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.verse::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 5rem;
    color: #3aaa35;
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
}

.verse p {
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

.verse span {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #3aaa35;
}

.verse-ref {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    font-style: normal;
    font-size: 0.85rem;
    color: #3aaa35;
    letter-spacing: 0.06em;
    background: rgba(58, 170, 53, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ============================================
   6. IA SECTION
   ============================================ */
.ia-section {
    background: linear-gradient(135deg, #0b1c39 0%, #0d2d52 50%, #0b3d2e 100%);
    color: white;
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}

.ia-section::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(58, 170, 53, 0.18) 0%, transparent 70%);
    border-radius: 50%;
}

.ia-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(58, 170, 53, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.ia-section h2 {
    color: white;
    font-family: 'Sora', sans-serif;
}

.ia-section h2 span {
    color: #3aaa35;
}

.ia-section p {
    color: rgba(255, 255, 255, 0.82);
}

.ia-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(58, 170, 53, 0.15);
    border: 1px solid rgba(58, 170, 53, 0.3);
    color: #6dd868;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.ia-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 28px 24px;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
    height: 100%;
}

.ia-card:hover {
    transform: translateY(-6px);
    background: rgba(58, 170, 53, 0.12);
    border-color: rgba(58, 170, 53, 0.4);
}

.ia-card-icon {
    font-size: 2rem;
    margin-bottom: 14px;
}

.ia-card h5 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    margin-bottom: 8px;
}

.ia-card p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
}

.ia-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #3aaa35;
    color: white;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    margin-top: 16px;
}

.ia-cta:hover {
    background: #2c8a29;
    color: white;
    transform: scale(1.04);
}

/* ============================================
   7. CONTACT SECTION
   ============================================ */
.contact-section {
    padding: 90px 0;
    background: linear-gradient(135deg, #f8f9fc, #eef3f7);
}

.contact-subtitle {
    color: #666;
    font-size: 1rem;
}

.contact-card {
    background: #fff;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-control {
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #3aaa35;
    box-shadow: 0 0 0 0.15rem rgba(58, 170, 53, 0.15);
}

.btn-send {
    background: linear-gradient(135deg, #3aaa35, #2c8a29);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(58, 170, 53, 0.25);
    color: white;
}

/* Alertes */
.alert-success-custom,
.alert-error-custom {
    display: none;
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
}

.alert-success-custom {
    background: rgba(58, 170, 53, 0.12);
    color: #2c8a29;
}

.alert-error-custom {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.35s ease-in-out;
    border-color: #e74c3c !important;
}

/* ============================================
   8. CLASSES UTILITAIRES
   ============================================ */
.tech-col img {
    width: 12% !important;
}

/* ============================================
   9. MÉDIAS QUERIES
   ============================================ */

/* Tablette et mobile (≤ 991px) : hamburger */
@media (max-width: 991px) {
    #navbar {
        padding: 12px 20px;
    }
    #navbar.scrolled {
        padding: 10px 20px;
    }
    .nav-links {
        display: none !important;
    }
    .hamburger {
        display: flex;
    }
    .ia-section::before,
    .ia-section::after {
        display: none;
    }
}

/* Hero tablette (577px – 991px) */
@media (min-width: 577px) and (max-width: 991px) {
    .hero {
        padding: 110px 0 70px;
        min-height: unset;
        height: auto;
        align-items: flex-start;
        background-position: right center;
    }
    .hero::before {
        background: linear-gradient(100deg, rgba(255, 255, 255, 0.96) 60%, rgba(255, 255, 255, 0.6) 80%, transparent 100%);
    }
    .hero-content {
        max-width: 70%;
    }
    .hero h1 {
        font-size: 2rem;
    }
}

/* Hero mobile (≤ 576px) */
@media (max-width: 576px) {
    .hero {
        padding: 90px 0 50px;
        min-height: unset;
        height: auto;
        align-items: flex-start;
        background-position: center top;
    }
    .hero::before {
        background: rgba(255, 255, 255, 0.90);
    }
    .hero-content {
        max-width: 100%;
    }
    .hero h1 {
        font-size: 1.7rem;
    }
    .verse {
        margin-top: 20px;
    }
    .verse p {
        font-size: 0.83rem;
    }
    .kl-tech-div-mobile{
        padding: 10px;
    }
}

/* TRÈS GRANDS ÉCRANS (4K, 2560px et plus) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    .hero h1 {
        font-size: 5rem;
    }
    .hero p {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 2.8rem;
    }
    p {
        font-size: 1.2rem;
    }
    .btn-primary {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
    .tech-logo {
        height: 55px;
        margin: 12px;
    }
    .card h5 {
        font-size: 1.5rem;
    }
    .section {
        padding: 100px 0;
    }
}

/* GRANDS ÉCRANS CLASSIQUES (1200px à 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .container {
        max-width: 1140px;
    }
    .hero h1 {
        font-size: 3.5rem;
    }
    h2 {
        font-size: 2.2rem;
    }
    p {
        font-size: 1rem;
    }
}

/* PETITS ORDINATEURS (992px à 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    .hero h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 2rem;
    }
    .tech-logo {
        height: 38px;
        margin: 8px;
    }
}

/* TABLETTES (768px à 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero {
        min-height: auto;
        padding: 80px 20px;
    }
    h2 {
        font-size: 1.8rem;
        text-align: left;
    }
    .section {
        padding: 60px 0;
    }
    .tech-logo {
        height: 35px;
        margin: 8px;
    }
    .row.align-items-center .col-md-6 {
        margin-bottom: 30px;
    }
}

/* TABLETTES MOYENNES (576px à 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero {
        min-height: auto;
        padding: 60px 15px;
    }
    .logo-top img {
        height: 25px;
    }
    h2 {
        font-size: 1.6rem;
        text-align: center;
    }
    .section {
        padding: 50px 0;
    }
    .tech-logo {
        height: 32px;
        margin: 6px;
    }
    .row.align-items-center {
        flex-direction: column;
    }
    .row.align-items-center .col-md-6 {
        width: 100%;
        margin-bottom: 30px;
    }
    .section .row.align-items-center .col-md-6:first-child {
        order: 1;
    }
    .section .row.align-items-center .col-md-6:last-child {
        order: 2;
    }
    .btn-primary {
        width: 100%;
        padding: 12px;
    }
    .card {
        margin-bottom: 20px;
    }
}

/* GRANDS TÉLÉPHONES (481px à 575px) */
@media (min-width: 481px) and (max-width: 575px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .hero {
        padding: 50px 15px;
        min-height: auto;
    }
    .logo-top img {
        height: 25px;
    }
    h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    p {
        font-size: 0.9rem;
    }
    .section {
        padding: 40px 0;
    }
    .col-md-4, .col-md-6 {
        padding-left: 12px;
        padding-right: 12px;
    }
    .tech-logo {
        height: 30px;
        margin: 5px;
    }
    .tech-box {
        padding: 15px;
    }
    .card {
        margin-bottom: 20px;
    }
    .card h5 {
        font-size: 1rem;
    }
    .row.align-items-center {
        flex-direction: column;
    }
    .row.align-items-center .col-md-6 {
        width: 100%;
        margin-bottom: 25px;
    }
    .section .row.align-items-center .col-md-6:first-child {
        order: 1;
    }
    .section .row.align-items-center .col-md-6:last-child {
        order: 2;
    }
    .btn-primary {
        width: 100%;
    }
    footer p, footer a {
        font-size: 0.85rem;
    }
}

/* PETITS TÉLÉPHONES (jusqu'à 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.45rem;
        margin-top: 20px;
    }
    .hero p {
        font-size: 0.85rem;
    }
    .hero {
        padding: 40px 15px;
        min-height: auto;
    }
    .logo-top img {
        height: 24px;
    }
    h2 {
        font-size: 1.3rem;
        text-align: center;
    }
    p {
        font-size: 0.85rem;
    }
    .verse span {
        font-size: 0.5rem;
    }
    .section {
        padding: 35px 0;
    }
    .col-md-4, .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }
    .tech-logo {
        height: 37px;
        margin: 5px;
    }
    .tech-box {
        padding: 12px;
    }
    .tech-box h5 {
        font-size: 1rem;
    }
    .card {
        margin-bottom: 15px;
        padding: 15px !important;
    }
    .produit .col-md-4 {
        margin-bottom: 15px;
    }
    .card h5 {
        font-size: 0.95rem;
    }
    .row.align-items-center {
        flex-direction: column;
    }
    .row.align-items-center .col-md-6 {
        width: 100%;
        margin-bottom: 20px;
    }
    .section .row.align-items-center .col-md-6:first-child {
        order: 1;
    }
    .section .row.align-items-center .col-md-6:last-child {
        order: 2;
    }
    .btn-primary {
        width: 100%;
        padding: 10px;
        font-size: 0.9rem;
    }
    form input, form textarea {
        font-size: 14px;
        padding: 8px 12px;
    }
    footer {
        padding: 30px 15px;
    }
    footer p, footer a {
        font-size: 0.8rem;
    }
    #contact .mt-3 {
        font-size: 0.9rem;
    }
    #navbar .nav-logo img {
        height: 28px;
    }
}

/* TRÈS PETITS TÉLÉPHONES (jusqu'à 360px) */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.2rem;
    }
    .hero p {
        font-size: 0.75rem;
    }
    .logo-top img {
        height: 25px;
    }
    h2 {
        font-size: 1.2rem;
    }
    .tech-logo {
        height: 25px;
        margin: 4px;
    }
    .card h5 {
        font-size: 0.85rem;
    }
}

/* IPAD PRO ET TABLETTES EN MODE PAYSAGE */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        height: 100vh;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
}

/* ============================================
   10. PRÉVENTION DES DÉBORDEMENTS
   ============================================ */
.container, .container-fluid {
    overflow-x: hidden;
}

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

.row {
    margin-left: auto;
    margin-right: auto;
}

/* Garantie que les images restent dans leur conteneur */
.col-md-6 img, .col-md-4 img {
    width: 100%;
    object-fit: cover;
}