/*
 * Styles complémentaires d'OPTIMA, chargés après le CSS compilé par Tailwind.
 * Ces règles hors « couche » Tailwind l'emportent sur ses classes : elles corrigent
 * l'affichage sur téléphone sans avoir à recompiler le CSS.
 */

/* ─── En-tête : s'affine et prend une ombre dès que l'on fait défiler la page ─── */
.site-header .header-row { height: 5rem; transition: height .3s ease; }
.site-header .header-logo { height: 3rem; width: auto; transition: height .3s ease; }
.site-header.is-scrolled { box-shadow: 0 12px 30px -18px rgba(3, 45, 107, .35); }
.site-header.is-scrolled .header-row { height: 4rem; }
.site-header.is-scrolled .header-logo { height: 2.5rem; }

/* Liens du menu (ordinateur) : trait orange sous la page active, qui se dessine aussi au survol */
.nav-link { position: relative; padding: .5rem 0; }
.nav-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: #FF6B00; transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Numéro de téléphone dans le menu : seulement sur les grands écrans, où il y a la place */
.header-phone { display: none; }
.header-phone::before { content: "\f095"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #FF6B00; }
@media (min-width: 1280px) { .header-phone { display: inline-flex; } }

/* Bouton d'appel rapide à côté du menu (téléphone) */
.header-call {
    width: 2.75rem; height: 2.75rem; border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #FFF1E6; color: #FF6B00;
}

/* ─── Menu mobile plein écran ─────────────────────────────────────────── */
.mobile-menu {
    position: fixed; inset: 0; z-index: 110;
    display: flex; flex-direction: column; overflow-y: auto;
    background: linear-gradient(165deg, #0646a7 0%, #032d6b 100%); color: #fff;
}
.mobile-menu__bar {
    flex: none; height: 5rem; padding: 0 1rem;
    display: flex; align-items: center; justify-content: space-between; background: #fff;
}
.mobile-menu__logo { height: 3rem; width: auto; }
.mobile-menu__close {
    width: 3rem; height: 3rem; display: inline-flex; align-items: center; justify-content: center;
    color: #0646a7; font-size: 1.6rem;
}
.mobile-menu__nav { padding: 1.25rem 1.5rem 0; }
.mobile-menu__link {
    display: flex; align-items: baseline; gap: 1rem; padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1); color: #fff;
    font-size: clamp(1.5rem, 7.5vw, 2.25rem); font-weight: 800; font-style: italic;
    text-transform: uppercase; letter-spacing: -.02em; line-height: 1;
    animation: mm-link-in .45s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms + 60ms);
}
.mobile-menu__num { min-width: 1.75rem; font-size: .65rem; font-style: normal; letter-spacing: .3em; color: #FF6B00; }
.mobile-menu__label { flex: 1; }
.mobile-menu__arrow { align-self: center; font-size: 1rem; color: rgba(255, 255, 255, .3); transition: transform .3s ease, color .3s ease; }
.mobile-menu__link.is-active { color: #FF6B00; }
.mobile-menu__link.is-active .mobile-menu__num { color: #fff; }
.mobile-menu__link.is-active .mobile-menu__arrow,
.mobile-menu__link:active .mobile-menu__arrow { color: #FF6B00; transform: translateX(4px); }
.mobile-menu__footer {
    margin-top: auto; display: grid; gap: .75rem;
    padding: 2rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
.mobile-menu__cta {
    display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 1.1rem;
    background: #FF6B00; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .25em; text-transform: uppercase;
}
.mobile-menu__quick { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.mobile-menu__quick a {
    display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .95rem;
    background: rgba(255, 255, 255, .1); color: #fff;
    font-size: 10px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase;
}
.mobile-menu__quick a.is-whatsapp { background: #25D366; }
.mobile-menu__socials { display: flex; justify-content: center; gap: .75rem; padding-top: .5rem; }
.mobile-menu__socials a {
    width: 2.75rem; height: 2.75rem; border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .1); color: #fff;
}
.mobile-menu__address { text-align: center; font-size: .75rem; color: rgba(255, 255, 255, .5); }
@keyframes mm-link-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
/* Ouverture et fermeture du menu */
.mm-enter { transition: opacity .25s ease, transform .25s ease; }
.mm-enter-start { opacity: 0; transform: translateY(-12px); }
.mm-enter-end { opacity: 1; transform: none; }
/* La page derrière ne défile pas quand le menu est ouvert */
html.menu-open, html.menu-open body { overflow: hidden; }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .mobile-menu__link { animation: none; } .mm-enter { transition: none; } }

/* ─── Témoignages (accueil) : place réservée aux citations, qui ne chevauchent plus les barres ─── */
.testimonial-stage { min-height: 500px; }
.testimonial-slide { left: 0; right: 0; top: 2rem; }
.testimonial-dot { position: relative; }
/* zone tactile élargie autour des fines barres de navigation */
.testimonial-dot::after { content: ""; position: absolute; left: 0; right: 0; top: -14px; bottom: -14px; }

/* Indication « faire glisser » : seulement sur téléphone */
.swipe-hint { display: none; }

/* ─── Formulaires (sur fond bleu) : libellés visibles, champs contrastés, erreur sous le champ ─── */
.form-field { display: grid; gap: .5rem; align-content: start; }
.form-label { font-size: 10px; font-weight: 900; letter-spacing: .25em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.form-required { color: #FF6B00; }
.form-control { position: relative; }
.form-icon {
    position: absolute; left: 1.1rem; top: 1.2rem; font-size: .85rem;
    color: rgba(255, 255, 255, .35); pointer-events: none; transition: color .2s ease;
}
.form-input {
    width: 100%; padding: .95rem 1.1rem .95rem 2.9rem; border-radius: 0; outline: none;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16);
    color: #fff; font-size: 1rem; font-weight: 500; line-height: 1.5;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
textarea.form-input { min-height: 8rem; resize: vertical; }
.form-input::placeholder { color: rgba(255, 255, 255, .32); }
.form-input:hover { border-color: rgba(255, 255, 255, .3); }
.form-input:focus { border-color: #FF6B00; background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 3px rgba(255, 107, 0, .25); }
.form-control:focus-within .form-icon { color: #FF6B00; }
/* champs remplis automatiquement par le navigateur : on garde le fond bleu */
.form-input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 1000px #1250ae inset; caret-color: #fff; }
.has-error .form-input { border-color: #f87171; }
.has-error .form-icon { color: #f87171; }
.form-error { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: #fecaca; }
.form-alert {
    display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; padding: 1rem 1.25rem;
    background: rgba(239, 68, 68, .12); border-left: 4px solid #ef4444; color: #fee2e2; font-size: .85rem; font-weight: 600;
}
.form-submit {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 1.25rem 1.5rem;
    background: #FF6B00; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .3em; text-transform: uppercase;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25); transition: background-color .4s ease, color .4s ease;
}
.form-submit:hover { background: #fff; color: #0646a7; }
.form-submit:disabled { opacity: .7; cursor: not-allowed; }
.form-note { display: flex; align-items: center; justify-content: center; gap: .5rem; font-size: .78rem; color: rgba(255, 255, 255, .55); text-align: center; }

/* ─── Pied de page ─────────────────────────────────────────────────────── */
.site-footer { position: relative; overflow: hidden; padding-top: 5rem; background: #F0F4F8; border-top: 1px solid rgba(226, 232, 240, .6); }
.site-footer__watermark {
    position: absolute; top: 1rem; right: -2rem; font-size: 18rem; line-height: 1;
    color: #0646a7; opacity: .03; transform: rotate(-12deg); pointer-events: none;
}
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; padding-bottom: 3.5rem; }
@media (min-width: 640px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
    .site-footer__grid { grid-template-columns: 1.6fr 1fr 1.15fr 1.35fr; gap: 2.5rem; }
    .site-footer__brand { grid-column: auto; }
}
.site-footer__logo { height: 3.5rem; width: auto; }
.site-footer__slogan {
    margin-top: 1.5rem; color: #0646a7; font-size: 1.9rem; font-weight: 800; font-style: italic;
    text-transform: uppercase; letter-spacing: -.03em; line-height: .95;
}
.site-footer__slogan span { display: block; color: #FF6B00; }
.site-footer__text { margin-top: 1.25rem; max-width: 26rem; font-size: .875rem; line-height: 1.7; color: #64748b; }
.site-footer__socials { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.site-footer__socials a {
    width: 2.6rem; height: 2.6rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
    background: #0646a7; color: #fff; transition: background-color .3s ease, transform .3s ease;
}
.site-footer__socials a:hover { background: #FF6B00; transform: translateY(-3px); }
.site-footer__socials a.is-whatsapp { background: #25D366; }
.site-footer__title { margin-bottom: 1.25rem; font-size: 11px; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; color: #FF6B00; }
.site-footer__links { display: grid; gap: .8rem; }
.site-footer__links a { display: inline-flex; align-items: center; font-size: .9rem; font-weight: 600; color: #334155; transition: color .2s ease; }
.site-footer__links a::before { content: ""; width: 0; height: 2px; margin-right: 0; background: #FF6B00; transition: width .25s ease, margin .25s ease; }
.site-footer__links a:hover, .site-footer__links a[aria-current="page"] { color: #0646a7; }
.site-footer__links a:hover::before, .site-footer__links a[aria-current="page"]::before { width: .9rem; margin-right: .6rem; }
.site-footer__contact { display: grid; gap: 1rem; }
.site-footer__contact li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .75rem; align-items: start; font-size: .9rem; line-height: 1.5; color: #334155; }
.site-footer__contact i { margin-top: .2rem; color: #FF6B00; }
.site-footer__contact a { font-weight: 600; overflow-wrap: anywhere; transition: color .2s ease; }
.site-footer__contact a:hover { color: #0646a7; }
.site-footer__cta {
    display: inline-flex; align-items: center; gap: .75rem; margin-top: 1.5rem; padding: .95rem 1.5rem;
    background: #0646a7; color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .25em; text-transform: uppercase;
    transition: background-color .3s ease;
}
.site-footer__cta:hover { background: #FF6B00; }
/* bas de page : l'espace sous le contenu laisse la place au bouton WhatsApp flottant */
.site-footer__bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
    padding: 1.5rem 0 6rem; border-top: 1px solid rgba(148, 163, 184, .25); font-size: .78rem; color: #94a3b8;
}
.site-footer__bottom-actions { display: flex; align-items: center; gap: .75rem; }
.site-footer__credit {
    display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 9999px;
    background: #fff; border: 1px solid #e2e8f0; color: #94a3b8;
    font-size: 9px; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; transition: border-color .3s ease;
}
.site-footer__credit strong { color: #0646a7; font-style: italic; letter-spacing: .3em; transition: color .3s ease; }
.site-footer__credit:hover { border-color: #0646a7; }
.site-footer__credit:hover strong { color: #FF6B00; }
.site-footer__top {
    width: 2.6rem; height: 2.6rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #e2e8f0; color: #0646a7; transition: background-color .3s ease, color .3s ease;
}
.site-footer__top:hover { background: #0646a7; color: #fff; }
@media (max-width: 639px) {
    .site-footer { padding-top: 3.5rem; }
    .site-footer__bottom { flex-direction: column; text-align: center; }
}

/* ─── Flèches des visionneuses de photos : rondes et contrastées, visibles même sur une photo claire ─── */
.gallery-arrow {
    width: 3rem; height: 3rem; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9999px; background: rgba(3, 45, 107, 0.6); font-size: 1.25rem;
}

/* ─── Téléphones (moins de 768 px de large) ───────────────────────────────── */
@media (max-width: 767px) {
    /* Espacements verticaux plus serrés entre les sections */
    .py-32 { padding-top: 5rem; padding-bottom: 5rem; }
    .py-24 { padding-top: 4rem; padding-bottom: 4rem; }
    .mb-48, .mb-32 { margin-bottom: 4rem; }
    .mb-24 { margin-bottom: 3.5rem; }
    .mb-20 { margin-bottom: 3rem; }
    .gap-24, .gap-20 { gap: 3rem; }
    .gap-16 { gap: 2.5rem; }
    /* Marges intérieures des cartes et formulaires : plus de place pour le texte */
    .p-10 { padding: 1.5rem; }

    /* Grands titres à la taille de l'écran : plus de mots coupés au bord */
    .text-6xl { font-size: clamp(2.25rem, 12vw, 3.75rem); }
    .text-5xl { font-size: clamp(1.9rem, 10.5vw, 3rem); }
    .text-\[12vw\] { font-size: 10vw; }
    .text-\[200px\] { font-size: 120px; }

    /* Une colonne de grille peut être plus étroite que son contenu (évite les débordements) */
    .grid > * { min-width: 0; }

    /* Photos à la mesure de l'écran : proportions au lieu de grandes hauteurs fixes */
    .h-\[600px\], .h-\[500px\] { height: auto; aspect-ratio: 4 / 3; }  /* Expertises, À propos */
    .h-\[550px\] { height: 21rem; }                                     /* cartes du portfolio */
    .h-\[400px\] { height: 18rem; }                                     /* carte Google Maps */
    .text-4xl { font-size: clamp(1.6rem, 7.5vw, 2.25rem); }

    /* Projets de l'accueil : bande que l'on fait glisser au doigt, au lieu de 3 grandes photos empilées */
    .projects-strip {
        display: flex; gap: .75rem; padding: 0 1rem .25rem;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .projects-strip::-webkit-scrollbar { display: none; }
    .projects-strip > * { flex: 0 0 84%; height: 24rem; scroll-snap-align: center; }
    .swipe-hint {
        display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.25rem;
        font-size: 10px; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; color: rgba(255, 255, 255, .6);
    }

    /* Cartes (expertises, engagements) plus compactes */
    .p-12 { padding: 1.75rem; }
    .card-num { font-size: 2.25rem; margin-bottom: .5rem; }
    .card-icon { margin-bottom: 1rem; }

    /* Logos des partenaires : trois par ligne, cases moins hautes */
    .partners-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
    .partners-grid > * { height: 7rem; padding: 1rem; }

    /* Boutons d'appel à l'action empilés : même largeur, bien alignés */
    .flex.flex-col.sm\:flex-row > a, .flex.flex-col.sm\:flex-row > button { width: 100%; justify-content: center; text-align: center; }

    /* Animations au défilement : petit déplacement vertical au lieu de 100 px */
    [data-aos="fade-up"]:not(.aos-animate) { transform: translate3d(0, 24px, 0); }

    /* Pas de survol au doigt : titres des projets et logos en couleur affichés directement */
    .grayscale { filter: none; }
    .project-tile-info { opacity: 1; background: linear-gradient(to top, rgba(6, 70, 167, 0.9), rgba(6, 70, 167, 0) 65%); }

    /* Témoignages : la citation affichée prend sa hauteur réelle (une seule est visible à la fois) */
    .testimonial-stage { min-height: 0; }
    .testimonial-slide { position: relative; top: 0; }

    /* Numéro de téléphone de l'accueil un peu plus petit */
    .phone-line { font-size: 1.35rem; }

    /* Textes de boutons très espacés : resserrés pour tenir sur une ligne */
    .tracking-\[0\.4em\] { letter-spacing: 0.2em; }

    /* Bouton WhatsApp flottant plus discret */
    .whatsapp-float { width: 3.25rem; height: 3.25rem; right: 1rem; bottom: 1rem; }
    .whatsapp-float i { font-size: 1.5rem; }

    /* Badge « 2018 » de la page À propos : reste dans l'écran */
    .founded-badge { left: 0; padding: 1.25rem 1.5rem; }

    /* Grand « 404 » de la page introuvable à la taille de l'écran */
    .text-\[220px\] { font-size: 9rem; }

    /* Champs de formulaire en 16 px : en dessous, l'iPhone agrandit la page à chaque saisie */
    input, select, textarea { font-size: 16px; }
}
