body {
    font-family: "Open Sans",sans-serif;
    color: #4b505a;
    background-color: #f5f5f5;
    line-height: 24px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.header-title.site-title {
  font-size: 36px;
}
.header-container {
    min-height: auto;
}
.content {
    background-color: #fff;
    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: 40px;
    padding-right: 40px;
    border-left: 1px solid rgba(0,0,0,.1);
    border-right: 1px solid rgba(0,0,0,.1);
}
.content img {
    width: auto;
}
.btn:visited,
.btn-primary:visited {
    color: #fff
}

.btn-big {
    font-size:1.2em;
    font-weight: bold;
    margin: 0 1em;
}
.btn-box {
    text-align: center;
    margin-top: 2em;
    margin-bottom: 1em;
}

.offer-buttons {
    font-size: 1.1em;
    margin:2em 1em;
    line-height: 2em;
}
.offer-buttons .btn-lg {
    line-height: 4em;
}

.archive {
    font-size: 14px;
    line-height: 24px;
    padding-top: 20px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(0,0,0,.1);
    border-top: 1px solid rgba(0,0,0,.1);
}


.container, .container-fluid {
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.container table {
  width: 100%;
}

.container h1:first-child {
    margin-top: 0;
}

/* home page */
.container.home h1 {
  font-weight: bold;
  text-align: center;
}
.container.home table {
  table-layout: fixed;
  width: 100%;
}
.container.home table img{
  margin-top:0px;
  margin-bottom:0px;
  width: 80%;
}
.container.home table td{
  vertical-align: baseline;
}

/* lizmap page */
.container.lizmap h1 {
  font-weight: bold;
  text-align: center;
}
.container.lizmap table {
  table-layout: fixed;
  width: 100%;
}
.container.lizmap table img{
  margin-top:0px;
  margin-bottom:0px;
  width: 80%;
}
.container.lizmap table td{
  vertical-align: baseline;
}

/* plans page */
.container.plans h1 {
  font-weight: bold;
  text-align: center;
}
.container.plans table {
  table-layout: fixed;
  width: 100%;
}
/* Sans largeur minimale, table-layout:fixed + width:100% écrase les six colonnes
   dans la largeur disponible : le conteneur ne défile jamais et la colonne de
   libellés collante ne sert à rien. */
#comparatif {
  min-width: 860px;
}

/* Chaque ligne du comparatif commence par un <th>, jamais par un <td> :
   la règle d'origine visait td:first-child et n'a donc jamais rien appliqué.
   Elle est aussi restreinte au comparatif, pour ne pas déborder sur les autres
   tableaux de la page. */
#comparatif th[scope="row"] {
  width: 32%;
  text-align: left;
}

.map {
  height:435px;
}
/* OpenLayers */
.olHandlerBoxZoomBox {border: 2px solid #7bd91e;position: absolute;background-color: white;opacity: 0.50;font-size: 1px;filter: alpha(opacity=50);}
.olControlPanel div { display:block;width:  28px;height: 28px;margin: 5px;}
.olControlPanel .olControlDragPanItemInactive {background-color: transparent;background-image: url("images/mousedef-in.png");}
.olControlPanel .olControlDragPanItemActive {background-color: transparent;background-image: url("images/mousedef.png");}
.olControlPanel .olControlZoomInItemInactive {background-color: transparent;background-image: url("images/zoomin-in.png");}
.olControlPanel .olControlZoomOutItemInactive {background-color: transparent;background-image: url("images/zoomout-in.png");}
.olControlPanel .olControlZoomBoxItemInactive {background-image: url("images/zoombox-in.png");}
.olControlPanel .olControlZoomBoxItemActive {background-image: url("images/zoombox.png");}
div.olControlMousePosition {font-family:arial;font-size:0.8em;background-color:#E0E0E0;bottom:0px;right:0px;margin:10px;padding:5px;height:17px;width:150px;color:#333333;text-align:center;}
div.olControlAttribution {bottom:5px;left:10px;padding:0;}
.olPopupCloseBox {background:url("images/close.png") no-repeat scroll 0 0 transparent; cursor: pointer; padding: 2px;}

/* legal-notice page */
.container.legal-notice h1 {
  margin-top: 0;
  font-weight: bold;
  text-align: center;
}

.offer-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    align-content: stretch;
}
.offer-box {
    display: flex;
    flex-direction: column;
    /* 190px de base : 5 cartes de front au-delà de 1200px, 3 au-delà de 992px,
       2 au-delà de 768px, sans calage manuel de hauteur. */
    flex: 1 1 190px;
    max-width: 100%;
    align-self: auto;
    border: 2px solid #246594;
    border-radius: 5px;
    margin: 0.5em;
    padding: 0.5em;
    position: relative;
}
.offer-box ul {
    flex: 1 1 auto;
}
/* Aligne les boutons au bas de chaque carte, quelle que soit la longueur du texte. */
.offer-box .offer-cta {
    margin-top: auto;
    margin-bottom: 0;
}
.offer-box .offer-cta .btn {
    white-space: normal;
}

/* Basic est la première offre avec une base PostgreSQL : sans elle, l'édition,
   les filtres et les formulaires de Lizmap ne fonctionnent pas. Orienter un
   primo-acheteur vers Starter pour économiser 40 € produit un client déçu. */
.offer-box-featured {
    border-width: 3px;
    border-color: #de1f3f;
}
.offer-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #de1f3f;
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 3px;
    white-space: nowrap;
    margin: 0;
}

.offer-box .price-note {
    margin: -0.5em 1em 1em;
    font-size: 0.8em;
    font-style: italic;
    line-height: 1.35em;
    color: #6a6f78;
}
.offer-step {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 27%;
    align-self: auto;
    border: 2px solid #246594;
    border-radius: 5px;
    margin: 0.5em;
    padding: 0.5em;
    text-align: center;
}

.offer-product,
.home-chiffres {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;
    align-self: auto;
    border: 2px solid #246594;
    border-radius: 5px;
    background-color: #246594;
    color: white;
    margin: 0.5em;
    padding: 0.5em;
    text-align:center;
    font-size:1.2em;
}

.home-chiffres strong {
    font-size: 1.2em;
}

.offer-qgis .offer-product {
    background-color: #8aac24;
    border-color: #8aac24;
    /* Le blanc sur ce vert ne donne que 2,62:1 (WCAG AA en exige 4,5).
       Le noir monte à 8,01:1, comme le fait déjà .offer-lizmap ci-dessous. */
    color: black;
}

.offer-lizmap .offer-product {
    background-color: #62c5b6;
    border-color: #62c5b6;
    color: black;
}

.offer-product img,
.home-chiffres img
{
    display: inline-block;
    float:left;
    width:50px;
    margin:0 1em;
}
.offer-product .version {
    font-size:1.2em;
    display:block;
}

.offer-box h2 {
    font-size: 1.8em;
    text-align:center;
    background-color: #9eefce;
    margin: 0 0 1em 0;
    padding: 10px;

}
.offer-box h2:after,
.offer-step h4:after {
    display:none;
}
.offer-box .price {
    margin-left: 1em;
    font-size:0.8em;
}
.offer-box .price span {
    font-size:3em;
    font-weight: bold;
    display: block;
}
.offer-box ul {
    padding: 1em;
}

.offer-box .note {
    font-size:0.85em;
    font-style:italic;
    line-height: 1.2em;
}

.offer-description {
    flex: 0 0 auto;
    min-height: 10em;
}
.offer-step h4 {
    font-size: 1.1em;
    text-align:center;
}

.offer-step img {
    min-width: 50px;
    max-width: 300px;
    margin-top:1em;
    margin-bottom:1em;
}


figure.screenshot {
    text-align: center;
    margin: 1em
}

figure.screenshot img  {
    width : 900px;
    margin: 1em 1em 0 1em ;
    display: inline;
}


/* 767.98 et non 768 : sinon cette requête et la suivante (min-width:768px)
   s'appliquent toutes deux à exactement 768 px et se contredisent. */
@media (max-width:767.98px) {
    .offer-description {
        min-height: 4em;
    }
    .offer-row {
        flex-direction: column;
    }
    figure.screenshot img {
        width : 500px;
    }
    #comparatif .comparatif-plan {
        font-size: 1em;
    }
}

@media (min-width:768px) {
    .offer-description {
        min-height: 9em;
    }
    .container {
        width: 750px;
    }
    figure.screenshot img {
        width : 600px;
    }
    #comparatif .comparatif-plan {
        font-size: 1.2em;
    }
}

@media (min-width:992px) {
    .offer-description {
        min-height: 7em;
    }
    .container {
        width: 970px;
    }
    figure.screenshot img {
        width : 700px;
    }
    #comparatif .comparatif-plan {
        font-size: 1.5em;
    }

}
@media (min-width:1200px) {
    .offer-description {
        min-height: 9em;
    }
    .container {
        width: 1170px;
    }
}

/* ------------------------------------------------------------------
   Accessibilité et compensation du passage <h1> -> <p> dans le bandeau
   ------------------------------------------------------------------ */

.header-content .header-title {
    line-height: 1.285714285714286em;
    letter-spacing: 2px;
    margin: 20px 0 10px;
}

/* Lien d'évitement : hors écran, mais focusable au clavier. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #fff;
    color: #111;
    padding: 12px 16px;
    font-weight: 600;
}
.skip-link:focus {
    left: 0;
}

/* Aucune des deux feuilles ne définissait de style de focus : la navigation au
   clavier était invisible. */
a:focus,
button:focus,
input:focus,
label:focus,
[tabindex]:focus {
    outline: 2px solid #de1f3f;
    outline-offset: 2px;
}


/* ------------------------------------------------------------------
   Comparatif des offres
   ------------------------------------------------------------------ */


.offer-box h2,
#comparatif .comparatif-plan {
    font-size: 1.8em;
    text-align: center;
    background-color: #9eefce;
    margin: 0 0 1em 0;
    padding: 10px;
    display: block;
    font-weight: 600;
}
#comparatif .comparatif-group {
    font-size: 1.5em;
    text-align: left;
    background-color: #9eefce;
    display: block;
    padding: 10px 10px 10px 2em;
    font-weight: 600;
}

/* position:sticky est peu fiable sous border-collapse:collapse : on repasse en
   separate et on redéclare les bordures. */
#comparatif {
    border-collapse: separate;
    border-spacing: 0;
}
#comparatif th,
#comparatif td {
    border: 0;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #eee;
    padding: 8px;
}
#comparatif tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    text-align: left;
    min-width: 190px;
    box-shadow: 2px 0 3px -1px rgba(0, 0, 0, 0.15);
}
#comparatif th[colspan] {
    position: static;
    box-shadow: none;
}
#comparatif tbody tr:nth-child(even) td {
    background: #fafafa;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive:focus {
    outline: 2px solid #de1f3f;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------
   Tableau des options
   ------------------------------------------------------------------ */

.table-options th,
.table-options td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: top;
}
.table-options thead th {
    background: #246594;
    color: #fff;
    text-align: left;
}

.plans .table-options tbody th,
.plans .table-options thead th {
    text-align: left;
}
.table-options tbody th {
    font-weight: 600;
}
.plans .table-options td {
    text-align: left;
}
.table-options .option-detail {
    font-weight: 400;
    font-size: 0.85em;
    color: #6a6f78;
}


/* ------------------------------------------------------------------
   Sélecteur d'offre du comparatif — CSS pur, aucun JS dans le thème
   ------------------------------------------------------------------ */

.plan-switcher {
    display: none;
}

@media (max-width: 767.98px) {
    .plan-switcher {
        display: block;
        border: 0;
        margin: 0 0 1em;
        padding: 0;
        text-align: center;
    }
    .plan-switcher legend {
        border: 0;
        margin-bottom: 0.5em;
        font-size: 0.95em;
        font-weight: 600;
        width: auto;
    }
    /* opacity:0 plutôt que display:none : la case reste atteignable au clavier
       et actionnable à la barre d'espace. */
    .plan-switcher input {
        position: absolute;
        opacity: 0;
        width: 1px;
        height: 1px;
    }
    .plan-switcher label {
        display: inline-block;
        padding: 10px 14px;
        min-height: 44px;
        border: 1px solid #246594;
        border-radius: 4px;
        margin: 3px;
        cursor: pointer;
    }
    .plan-switcher input:checked + label {
        background: #246594;
        color: #fff;
    }
    .plan-switcher input:focus + label {
        outline: 2px solid #de1f3f;
        outline-offset: 2px;
    }

    /* Une seule colonne d'offre à la fois. Les lignes de groupe utilisent
       th[colspan] et ne sont donc jamais touchées par ces sélecteurs sur td.

       :has() plutôt que le combinateur ~ : les boutons radio vivent dans le
       <fieldset> (correct sémantiquement), donc aucun sélecteur de voisinage ne
       peut atteindre le tableau depuis eux. Sur un navigateur sans :has(), la
       règle est ignorée et le tableau reste simplement défilable — la
       dégradation est propre. */
    #comparatif {
        min-width: 0;
    }
    .comparatif-wrapper:has(#pc1:checked) #comparatif td:not(:nth-child(2)):not(.comparatif-corner),
    .comparatif-wrapper:has(#pc1:checked) #comparatif thead th:nth-child(n+3) { display: none; }

    .comparatif-wrapper:has(#pc2:checked) #comparatif td:not(:nth-child(3)):not(.comparatif-corner),
    .comparatif-wrapper:has(#pc2:checked) #comparatif thead th:nth-child(2),
    .comparatif-wrapper:has(#pc2:checked) #comparatif thead th:nth-child(n+4) { display: none; }

    .comparatif-wrapper:has(#pc3:checked) #comparatif td:not(:nth-child(4)):not(.comparatif-corner),
    .comparatif-wrapper:has(#pc3:checked) #comparatif thead th:nth-child(-n+3),
    .comparatif-wrapper:has(#pc3:checked) #comparatif thead th:nth-child(n+5) { display: none; }

    .comparatif-wrapper:has(#pc4:checked) #comparatif td:not(:nth-child(5)):not(.comparatif-corner),
    .comparatif-wrapper:has(#pc4:checked) #comparatif thead th:nth-child(-n+4),
    .comparatif-wrapper:has(#pc4:checked) #comparatif thead th:nth-child(6) { display: none; }

    .comparatif-wrapper:has(#pc5:checked) #comparatif td:not(:nth-child(6)):not(.comparatif-corner),
    .comparatif-wrapper:has(#pc5:checked) #comparatif thead th:nth-child(-n+5) { display: none; }

    /* Les cellules fusionnées de la ligne « support » ne doivent pas disparaître. */
    #comparatif td[colspan] { display: table-cell !important; }

    /* Le sélecteur masque déjà les colonnes : la colonne de libellés n'a plus
       besoin d'être collante, et le tableau tient dans l'écran.

       table-layout:auto est indispensable : en `fixed`, le navigateur répartit
       encore la largeur sur les six colonnes d'origine, dont cinq sont masquées,
       et les deux colonnes visibles se retrouvent écrasées. */
    #comparatif {
        table-layout: auto;
        width: 100%;
    }
    #comparatif tbody th[scope="row"],
    #comparatif thead th {
        position: static;
        box-shadow: none;
        width: auto;
        min-width: 0;
    }
    #comparatif tbody th[scope="row"] {
        width: 45%;
    }
    /* La cellule d'angle masquée laissait une ligne d'en-tête vide. */
    #comparatif thead tr {
        display: table-row;
    }

    /* Sur mobile les cartes s'empilent : Basic, l'offre recommandée, passe en tête. */
    .offer-box-featured {
        order: -1;
    }
    .offer-badge {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 0.5em;
    }

    /* La cellule d'angle reste affichée : sans elle, le nom de l'offre tombe
       dans la colonne des libellés au lieu de s'aligner sur ses données. */
    .comparatif-corner {
        width: 45%;
    }
}

/* ------------------------------------------------------------------
   Navigation sur petit écran
   ------------------------------------------------------------------ */

/* Le thème ne charge aucun JavaScript : le navbar repliable de Bootstrap 3 ne
   peut pas fonctionner. Avec six entrées, une rangée qui passe à la ligne fait
   mieux qu'un menu hamburger — et donne des cibles tactiles de 44px. */
@media (max-width: 767.98px) {
    .header-nav {
        height: auto;
        line-height: 1.4;
        padding: 12px 0;
    }
    .header-nav .header-logo,
    .header-nav .nav {
        float: none !important;
    }
    .header-nav .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 8px;
    }
    .header-nav .nav a {
        margin: 4px;
        padding: 12px 10px;
        min-height: 44px;
        display: flex;
        align-items: center;
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
    }

    /* width:900px fixe déborde d'un écran de 360px, malgré les surcharges. */
    figure.screenshot img {
        width: auto;
        max-width: 100%;
        height: auto;
    }
}

/* Aucune image de contenu ne doit pouvoir déborder du viewport. */
.content img {
    max-width: 100%;
    height: auto;
}

/* ------------------------------------------------------------------
   Page d'accueil
   ------------------------------------------------------------------ */

/* Les deux boutons de l'accueil portaient tous deux .btn-primary : aucun des
   deux n'était donc l'action principale. */
.btn-secondary,
.btn-secondary:visited {
    background-color: transparent;
    border: 2px solid #246594;
    color: #246594;
}
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #246594;
    border-color: #246594;
    color: #fff;
    text-decoration: none;
}

.hero-price {
    text-align: center;
    font-size: 1.35em;
    margin: 1.2em 0 0;
}
.hero-price strong {
    color: #246594;
}
.hero-proof {
    text-align: center;
    font-size: 0.9em;
    color: #6a6f78;
    margin-bottom: 2em;
}
/* Un « 470 installations » sans date se lit comme du marketing ; daté, il se
   lit comme un fait. */
.chiffres-date {
    text-align: center;
    font-size: 0.85em;
    font-style: italic;
    color: #6a6f78;
    margin-top: 0.5em;
}

.offer-step h3 {
    font-size: 1.15em;
    text-align: center;
    margin-top: 0;
}
.offer-step h3:after {
    display: none;
}
.offer-step img {
    display: block;
    margin: 1em auto;
    max-width: 100%;
    height: auto;
}

/* Sur l'accueil, les trois cartes tarifaires ne sont qu'un aperçu : titre en h3,
   pas de liste, hauteur libre. */
.container.home .offer-box h3 {
    font-size: 1.25em;
    text-align: center;
    background-color: #9eefce;
    margin: 0 0 0.8em 0;
    padding: 10px;
}
.container.home .offer-box h3:after {
    display: none;
}
.container.home .offer-box p {
    padding: 0 0.8em 0.8em;
    margin: 0;
}
