/* =============================================================================
   Socle CSS commun des sites de présentation Dexma.
   Chaque site redéfinit les variables de :root dans son propre theme.css.
   ============================================================================= */

:root {
    /* Couleurs */
    --couleur-primaire: #007f7f;          /* icône et texte du logo, bouton démo */
    --couleur-accent: #03a9f4;            /* soulignement menu, icônes des cartes */
    --couleur-courbe: #32a1ce;            /* liseré de la courbe sous le hero */
    --couleur-titre: #3C424F;
    --couleur-texte: #8E9DAE;
    --couleur-corps: #1b1919;
    --couleur-fond: #ffffff;
    --couleur-fond-alterne: #f5fafd;      /* sections .fond_alterne */
    --couleur-bouton-contact: #d9534f;
    --couleur-footer: #222;
    --couleur-footer-texte: #d3d3d3;
    --couleur-footer-site: orange;        /* cartouche « site web » du footer */
    --couleur-video-fond: #0b5f67;

    /* Images (chemins absolus depuis la racine du site) */
    --fond-hero: none;
    --fond-contact: none;
    --hero-position-y: 60%;

    /* Polices */
    --police-texte: "Open Sans", sans-serif;
    --police-titres: Muli, sans-serif;
    --police-logo: 'Futura PT', sans-serif;
}

html { font-size: 100%; scroll-padding-top: 90px; }

body {
    color: var(--couleur-corps);
    font-weight: 200;
    font-family: var(--police-texte);
    line-height: 1.6;
    margin: 0;
}

cite { font-size: 0.9rem; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--police-titres);
    font-weight: 600;
    color: var(--couleur-titre);
    text-rendering: optimizeLegibility;
    margin-bottom: 16px;
}

/* -------------------------- HEADER (<dx-header>) ------------------------- */
#header {
    position: fixed;
    top: 0;
    height: 90px;
    width: 100%;
    box-shadow: 0 0 5px 0 rgba(0,0,0,.33);
    font-weight: 600;
    line-height: 160%;
    letter-spacing: 1px;
    text-transform: uppercase;
    background-color: transparent;
    z-index: 10;
    overflow: hidden;
    transition: background-color .2s;
}

.header_down { background-color: var(--couleur-fond) !important; color: var(--couleur-corps) !important; }
.header_down #menu a { color: #161313; }

#logo {
    position: absolute;
    top: 10px;
    left: 8%;
    display: flex;
    align-items: center;
    font-size: 2rem;
    text-decoration: none;
}

.logo i {
    color: var(--couleur-primaire);
    font-size: 1.5em;
    margin-right: 1rem;
    text-shadow: 0 1rem 1.5rem rgba(0,0,0,.5);
}

.logo span {
    color: #fff;
    text-transform: none;
    font-family: var(--police-logo);
    font-weight: 400;
    letter-spacing: 7px;
    text-shadow: 0 1rem 1.5rem rgba(0,0,0,.5);
}

.logo span.iconBold { font-weight: 500; }
.header_down #logo span { color: var(--couleur-primaire); }

/* Logo image : version claire sur le hero, foncée une fois le header blanc */
#logo img { max-width: 300px; max-height: 70px; }
#logo .logo-fonce, .header_down #logo .logo-clair { display: none; }
.header_down #logo .logo-fonce { display: block; }

#menu {
    position: absolute;
    top: 10px;
    right: 5%;
    height: 80px;
    color: white;
}

#burger { display: none; }
#menu ul { list-style: none; }
#menu li { padding: 12px; display: inline-block; }

#menu a {
    border-bottom: 3px solid var(--couleur-accent);
    text-decoration: none;
    color: #f8f8f8;
}

/* -------------------------- CORPS ---------------------------------------- */
#corps { width: 100%; min-height: 100vh; }

/* -------------------------- HERO ----------------------------------------- */
#hero {
    position: relative;
    display: flex;
    width: 100%;
    height: calc(100vh - 300px);
    background-image: var(--fond-hero);
    background-size: cover;
    background-attachment: fixed;
    background-position: 50% var(--hero-position-y);
    padding-top: 90px;
    color: white;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    flex-direction: column;
}

#mainDescription {
    display: flex;
    max-width: 800px;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    font-family: var(--police-titres);
    text-rendering: optimizeLegibility;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 130%;
    color: #fff;
    padding: 10px;
}

.hero-title { margin-bottom: 1.25rem; font-size: 2rem; line-height: 1.14; letter-spacing: .9px; }

/* Hero avec vidéo à droite */
#hero.hero-video { box-sizing: border-box; flex-direction: row; height: auto; min-height: calc(100vh - 300px); padding: 130px 4% 175px; gap: 48px; }
#hero.hero-video #mainDescription { flex: 1 1 340px; max-width: 480px; }
#hero.hero-video .hero-title { font-size: 2.4rem; }
#heroVideo { flex: 1 1 480px; max-width: 760px; }
#heroVideo video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 24px 60px rgba(0,0,0,.5); background: var(--couleur-video-fond); }
.hero-cta { width: 100%; margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.hero-duree { font-size: 1.05rem; opacity: .9; }

/* Cartes de fonctionnalités sous le hero */
#heroFooter {
    position: relative;
    margin-top: -120px;
    width: 100%;
    min-height: 300px;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}

.heroItem {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.5rem;
    color: var(--couleur-texte);
    width: 13%;
    min-width: 300px;
}

.heroItem h1 { font-size: 1.25rem; }

.heroIcon {
    border-color: var(--couleur-accent);
    font-size: 4rem;
    color: var(--couleur-accent);
    border-radius: 100%;
    line-height: 2.125em;
    text-align: center;
}

/* -------------------------- SECTIONS ------------------------------------- */
.boite {
    background-color: var(--couleur-fond);
    text-rendering: optimizeLegibility;
    justify-content: center;
    color: var(--couleur-texte);
    padding: 2% 6%;
    font-size: 1.2rem;
    min-height: 400px;
}

.boite h1 {
    font-weight: 300;
    color: var(--couleur-titre);
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
    font-size: 2.3rem;
}

.boite cite { font-weight: 300; width: 100%; text-align: center; }

.fond_alterne { background-color: var(--couleur-fond-alterne); }

/* Captures superposées */
.imgCtnr {
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.imgCtnr img { position: absolute; max-width: 90%; }
.img1_3 { left: 2%; top: 15%; z-index: 3; max-height: 85%; }
.img2_3 { left: 20%; top: 0; z-index: 2; max-width: 80%; }
.img3_3 { right: 0; top: 0; z-index: 1; }
.col_img { width: 100%; }

/* -------------------------- UTILITAIRES ---------------------------------- */
.shadow-large { box-shadow: 0 10px 30px 0 rgba(189,189,189,.3), 0 10px 30px rgba(0,0,0,.08); }

.curve::after {
    position: absolute;
    border-top-left-radius: 25% 100%;
    border-top-right-radius: 25% 100%;
    height: 50px;
    width: 100%;
    background-color: var(--couleur-fond);
    display: block;
    bottom: 0;
    content: "";
    border-top: thick double var(--couleur-courbe);
}

.bordered { border: 2px solid var(--couleur-accent); line-height: 2.125em; width: calc(2.125em + 4px); }
.light_bordered { border: 1px solid #e0e1e1; }
.iconshadow { box-shadow: 0 10px 30px 0 rgba(49,52,57,.3), 0 10px 30px rgba(0,0,0,.08); }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; }
.marged_center_content { margin: 1em; justify-content: center !important; align-content: center !important; }
.carte_texte { margin: 1em; }

/* -------------------------- GRILLE --------------------------------------- */
.row { display: flex; flex-wrap: wrap; align-content: center; justify-content: flex-start; }

.col {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    box-sizing: border-box;
    min-width: 200px;
}

.l1 { flex-basis: 8.333333%; max-width: 8.333333%; }
.l2 { flex-basis: 16.66667%; max-width: 16.66667%; }
.l3 { flex-basis: 25%; max-width: 25%; }
.l4 { flex-basis: 33.33333%; max-width: 33.33333%; }
.l5 { flex-basis: 41.66667%; max-width: 41.66667%; }
.l6 { flex-basis: 50%; max-width: 50%; }
.l7 { flex-basis: 58.33333%; max-width: 58.33333%; }
.l8 { flex-basis: 66.66667%; max-width: 66.66667%; }
.l9 { flex-basis: 75%; max-width: 75%; }
.l10 { flex-basis: 83.33333%; max-width: 83.33333%; }
.l11 { flex-basis: 91.66667%; max-width: 91.66667%; }
.l12 { flex-basis: 100%; max-width: 100%; }

/* -------------------------- BOUTONS -------------------------------------- */
.btn {
    display: inline-block;
    font-weight: 300;
    text-align: center;
    vertical-align: middle;
    touch-action: manipulation;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    padding: 3px 8px;
    font-size: 1.4rem;
    color: #ffffff;
    line-height: 1.4;
    border-radius: 3px;
    user-select: none;
    text-decoration: none;
}

.btn_contact { width: 200px; margin: auto; height: 50px; background-color: var(--couleur-bouton-contact); }
.btn_demo { width: 200px; padding: 0.5rem; background-color: var(--couleur-primaire); }

/* -------------------------- CONTACT (<dx-contact>) ----------------------- */
#row_contact {
    display: flex;
    flex-direction: column;
    background-image: var(--fond-contact);
    background-color: var(--couleur-primaire);
    background-size: cover;
    background-position: center top;
    color: aliceblue;
    align-items: center;
}

#row_contact h1 { color: aliceblue; }

#form_contact {
    margin: 2rem;
    padding: 2rem;
    background-color: white;
    color: var(--couleur-titre);
    max-width: 1000px;
}

#form_contact input, #form_contact select, #form_contact textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    min-height: 2.5rem;
    outline: 0;
    background-color: #fff;
    border: 1px solid black;
    border-radius: 3px;
    padding: 0 12px;
    margin: 10px;
}

#form_contact textarea { height: 25rem; padding: 12px; }
#form_contact .message_envoi { width: 100%; text-align: center; margin-top: 1rem; }

/* -------------------------- FOOTER (<dx-footer>) ------------------------- */
#footer { background: var(--couleur-footer); justify-content: center; align-items: center; }

.cartoucheFooter {
    display: flex;
    border-inline: 1px solid rgba(128,128,128,.2);
    width: 10%;
    min-width: 150px;
    flex-direction: column;
    align-items: center;
    height: 200px;
    color: var(--couleur-footer-texte);
    text-align: center;
    padding: 1rem;
}

.cartoucheFooter i { font-size: 3rem; margin-bottom: 1rem; }
.cartoucheFooter a { color: inherit; text-decoration: none; }
.cartoucheFooter.site { background-color: var(--couleur-footer-site); color: white; }

/* -------------------------- HERO : variantes ----------------------------- */
#heroVideo iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 24px 60px rgba(0,0,0,.5); background: var(--couleur-video-fond); }
#heroVideo.hero-image { display: flex; justify-content: center; }
#heroVideo.hero-image img { display: block; max-width: 100%; max-height: 62vh; filter: drop-shadow(0 24px 40px rgba(0,0,0,.45)); }
.hero-nouveau { width: 100%; margin-top: 1rem; font-size: 1.15rem; line-height: 1.4; }
.hero-nouveau strong { font-weight: 700; }

/* Cartes du heroFooter : icône pleine, cartes cliquables, version compacte (5 cartes ou plus sur une ligne) */
.heroIcon.plein { background-color: var(--couleur-accent); color: #fff; }
.heroItem .heroIcon { transition: transform .2s; }
.heroItem > a, a.heroItem { text-decoration: none; }
a.heroItem:hover .heroIcon { transform: translateY(-4px); }
a.heroItem h1, a.heroItem cite { text-align: center; }
.heroItem .lien { color: var(--couleur-accent); font-weight: 600; }
.heroItem .btn { margin: 0 auto 1rem; }
#heroFooter.compact .heroItem { width: 18%; min-width: 200px; }

/* -------------------------- BOUTONS : variantes -------------------------- */
.btn_auto { width: auto; padding: 0.5rem 1.5rem; font-size: 1.1rem; }
.col > .btn { margin: .5rem 0 1.5rem; }
.btn_store { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1.4rem; font-size: 1.1rem; font-weight: 600; background-color: var(--couleur-primaire); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.btn_store i { font-size: 1.4em; }
.btn_store:hover { filter: brightness(1.1); }
.lien_store img { display: block; width: 160px; margin-top: 1.5rem; }

/* -------------------------- TEXTE DE SECTION ----------------------------- */
.boite p { margin: 0 0 1rem; }
.boite h2 { font-weight: 400; font-size: 1.6rem; width: 100%; margin: 1rem 0 .5rem; }
.surtitre { width: 100%; font-family: var(--police-titres); font-weight: 700; font-size: .9rem; letter-spacing: 3px; text-transform: uppercase; color: var(--couleur-titre); margin-bottom: .5rem; }
.mise_en_avant { font-style: italic; font-weight: 700; color: var(--couleur-accent); }
.liste_puces { margin: 0 0 1rem; padding-left: 1.2rem; }
.liste_puces li { margin-bottom: .3rem; }

/* -------------------------- CARTES --------------------------------------- */
/* Rangée centrée de cartes alignées en haut */
.row_cartes { align-items: flex-start; justify-content: center; }
.row_cartes > span { width: 100%; text-align: center; }
.carte_texte.centre { width: 100%; text-align: center; color: var(--couleur-titre); }
.carte_img_contenue { width: 100%; height: 200px; object-fit: contain; padding-top: 1rem; }

/* .grille_cartes > .carte (img.carte_img + h3 + p) ; colonnes auto selon --carte-min */
.grille_cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--carte-min, 240px), 1fr)); gap: 2rem; width: 100%; margin: 1.5rem 0; align-items: start; }
.carte { display: flex; flex-direction: column; font-size: 1rem; background-color: transparent; }
.carte.light_bordered { background-color: var(--couleur-fond); }
.carte h3 { font-size: 1.15rem; font-weight: 600; margin: 1rem 0 .5rem; }
.carte.light_bordered h3, .carte.light_bordered p { margin-inline: 1rem; }
.carte_img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.carte_survol { transition: transform .2s; }
.carte_survol:hover { transform: translateY(-6px); }
.carte_icones { display: flex; gap: .5rem; }
.carte_icones img { height: 56px; }

/* Vignettes (logos d'applications, partenaires…) : figure.vignette > img + figcaption */
.vignettes { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; width: 100%; margin-top: 2rem; }
.vignette { margin: 0; width: 220px; text-align: center; }
.vignette img { display: block; width: 100%; height: 140px; object-fit: contain; background: var(--couleur-fond); }
.vignette figcaption { padding: .8rem; color: var(--couleur-titre); font-size: 1rem; }

/* -------------------------- IMAGES --------------------------------------- */
.imgCtnr .img3_3 { top: 25%; max-width: 40%; max-height: 70%; }
.imgCtnr img.img_45 { max-width: 45%; }
.imgCtnr img.img_60 { max-width: 60%; }
.imgCtnr img.img_70 { max-width: 70%; }
.imgCtnr img.haut_20 { top: 20%; }
.imgCtnr img.haut_40 { top: 40%; }
.imgCtnr img.bas { top: auto; bottom: 0; }
.img_section { display: block; max-width: 100%; margin: auto; }
.img_capture { display: block; max-width: 100%; max-height: 560px; margin: 2rem auto; border-radius: 6px; }

/* -------------------------- TÉMOIGNAGES ---------------------------------- */
/* .temoignages > figure.temoignage (i.temoignage_guillemet + blockquote + img + figcaption) */
.temoignages { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; width: 100%; margin: 1.5rem 0; }
.temoignage { flex: 0 1 380px; margin: 0; padding: 1.5rem; text-align: center; font-size: 1rem; background-color: var(--couleur-fond); }
.temoignage_guillemet { font-size: 1.6rem; color: var(--couleur-accent); }
.temoignage blockquote { margin: 1rem 0; font-style: italic; }
.temoignage img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.temoignage figcaption { margin-top: .5rem; }
.temoignage_nom { display: block; font-family: var(--police-titres); font-weight: 700; letter-spacing: 2px; color: var(--couleur-titre); }
.temoignage_societe { display: block; font-size: .9rem; font-style: italic; }

/* -------------------------- CHIFFRES CLÉS -------------------------------- */
/* .chiffres > .chiffre (strong + span) */
.chiffres { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; width: 100%; margin: 1.5rem 0; }
.chiffre { flex: 0 1 220px; padding: 1.5rem 1rem; text-align: center; background-color: var(--couleur-fond); border-top: 4px solid var(--couleur-accent); }
.chiffre strong { display: block; font-family: var(--police-titres); font-size: 2.6rem; font-weight: 700; line-height: 1.1; color: var(--couleur-primaire); }
.chiffre span { display: block; margin-top: .5rem; font-size: 1rem; }

/* -------------------------- TABLEAU D'EXEMPLE ---------------------------- */
/* Illustration d'un écran de l'application (données fictives) */
.tableau_exemple { width: 100%; border-collapse: collapse; font-size: .95rem; background-color: var(--couleur-fond); }
.tableau_exemple caption { caption-side: bottom; padding-top: .6rem; font-size: .85rem; font-style: italic; }
.tableau_exemple th { background-color: var(--couleur-primaire); color: #fff; font-weight: 600; padding: .6rem; text-align: right; }
.tableau_exemple td { padding: .55rem .6rem; text-align: right; border-bottom: 1px solid #e0e1e1; color: var(--couleur-titre); }
.tableau_exemple th:first-child, .tableau_exemple td:first-child { text-align: left; }
.tableau_exemple tr.total td { font-weight: 700; background-color: var(--couleur-fond-alterne); }
.tableau_exemple .positif { color: #2e7d4f; }
.tableau_exemple .negatif { color: #c0392b; }
.defilement_h { width: 100%; overflow-x: auto; }

/* -------------------------- RESPONSIVE ----------------------------------- */
@media (min-width: 1200px) {
    #hero.hero-video { flex-wrap: nowrap; }
    #hero.hero-video #mainDescription { flex: 0 1 460px; }
    #heroVideo { flex: 1 1 auto; }
}

@media (max-width: 767px) {
    html { scroll-padding-top: 70px; }
    #header { height: 70px; }
    #menu { display: none; }
    .col { flex-basis: 100% !important; max-width: 100% !important; }
    #hero.hero-video { padding: 90px 16px 150px; gap: 28px; }
    #hero.hero-video .hero-title { font-size: 1.7rem; }
    #heroVideo { flex-basis: 100%; }
}

/* Menu compact sur écrans intermédiaires (évite le chevauchement avec le logo), masqué sous 1024 px */
@media (min-width: 1024px) and (max-width: 1499px) {
    #menu { font-size: .8rem; }
    #menu li { padding: 12px 6px; }
    #logo { top: 17px; }
    #logo img { max-height: 56px; }
}

/* Menu burger sous 1024 px : le menu se déplie sous le header */
@media (max-width: 1023px) {
    #menu { display: none; }
    #burger {
        display: block;
        position: absolute;
        top: 50%;
        right: 5%;
        transform: translateY(-50%);
        font-size: 1.8rem;
        color: #fff;
        background: none;
        border: 0;
        cursor: pointer;
        text-shadow: 0 .3rem 1rem rgba(0,0,0,.5);
    }
    .header_down #burger, #header.menu_ouvert #burger { color: var(--couleur-primaire); text-shadow: none; }
    #header.menu_ouvert { overflow: visible; background-color: var(--couleur-fond); }
    #header.menu_ouvert #logo span { color: var(--couleur-primaire); }
    #header.menu_ouvert #logo .logo-clair { display: none; }
    #header.menu_ouvert #logo .logo-fonce { display: block; }
    #header.menu_ouvert #menu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: auto;
        background-color: var(--couleur-fond);
        box-shadow: 0 8px 12px rgba(0,0,0,.2);
    }
    #header.menu_ouvert #menu ul { margin: 0; padding: .5rem 0; }
    #header.menu_ouvert #menu li { display: block; padding: 0; }
    #header.menu_ouvert #menu a { display: block; padding: .9rem 8%; color: var(--couleur-titre); border-bottom: 1px solid var(--couleur-fond-alterne); }
}

@media (max-width: 767px) {
    #heroVideo.hero-image img { max-height: 50vh; }
    #heroFooter.compact .heroItem { width: 45%; min-width: 160px; }
    #heroFooter.compact .heroIcon { font-size: 2.6rem; }
    .grille_cartes { gap: 1.5rem; }
    .imgCtnr img.img_45, .imgCtnr img.img_60, .imgCtnr img.img_70 { max-width: 85%; }
    .img_capture { max-height: 460px; }
}
