/* =========================================================================
   motels-montreal.com
   Repertoire de motels du Grand Montreal.
   Concu mobile d'abord : la moitie des visiteurs cherchent une chambre
   depuis la route. Le numero de telephone est l'element principal.
   ========================================================================= */

:root {
  --encre:        #16202b;
  --lien:         #1a5fb4;   /* point 017 : bleu de lien classique assombri */
  --lien-visite:  #7a3a9c;
  --encre-clair:  #2a3948;
  --ambre:        #ffb627;
  --ambre-sombre: #b87c00;
  --brique:       #c1462e;
  --papier:       #f6f4f1;
  --blanc:        #ffffff;
  --texte:        #2c3742;
  --gris:         #5e6b78;
  --trait:        #ded9d2;

  --bleu-bande:   #0b39e1;   /* point 0028 : le bleu de headingBg.png */
  --largeur:      64rem;
  --rayon:        3px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* Point 0029 : l'enseigne au neon de l'ancien site, fixe au defilement. */
  background: #000 url('/images/bg1.jpg') no-repeat center top fixed;
  background-size: cover;
  color: var(--texte);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

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

a { color: var(--lien); }
a:visited { color: var(--lien-visite); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--ambre);
  outline-offset: 2px;
}

.saut {
  position: absolute; left: -9999px;
  background: var(--encre); color: var(--blanc);
  padding: .75rem 1rem; z-index: 100;
}
.saut:focus { left: .5rem; top: .5rem; }

/* --- Entete : l'enseigne ------------------------------------------------ */

.entete { background: var(--encre); color: var(--blanc); }

.bande {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1.25rem;
}

.marque {
  display: inline-block;
  text-decoration: none;
  color: var(--blanc);
  max-width: 100%;
}
.marque img {
  width: auto;
  max-width: min(305px, 100%);
  height: auto;
  /* Point 0026 : coins arrondis. */
  border-radius: 8px;
}

/* --- Emplacements publicitaires ----------------------------------------- */

/* L'ancien site laissait le 728x90 deborder sur mobile. Ici le conteneur
   recadre proprement : l'annonce reste centree et ne provoque jamais de
   defilement horizontal. */
.pub {
  margin: 0 auto 1.75rem;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}
.pub ins { max-width: 100%; }
.pub-ligne {
  list-style: none;
  margin: 0 0 .75rem;
}
.pub-ligne .pub { margin-bottom: 0; }

/* Reserve la hauteur pour eviter que le contenu saute quand l'annonce
   arrive. Google recommande cette pratique. */
.pub-banniere { min-height: 90px; }
.pub-carre    { min-height: 250px; }

@media (max-width: 47rem) {
  /* Le leaderboard 728px ne tient pas sur un telephone ; on le laisse se
     recadrer plutot que de casser la mise en page. */
  .pub-banniere { min-height: 0; }
}

.accroche {
  margin: .5rem 0 0;
  color: #aab6c2;
  font-size: .95rem;
  max-width: none;
}

/* --- Navigation --------------------------------------------------------- */

.nav { background: var(--encre-clair); }
.nav ul {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 .5rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.nav li { margin: 0; }
.nav a {
  display: block;
  padding: .85rem .9rem;
  color: #d6dee6;
  text-decoration: none;
  font-size: .95rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--blanc); }
.nav a[aria-current="page"] {
  color: var(--blanc);
  font-weight: 600;
  border-bottom-color: var(--ambre);
}
.nav-langue { margin-left: auto; }
/* Point 0025 : le lien Quebec se fond dans le menu, sans surbrillance. */
.nav-quebec a  { color: #d6dee6; }
.nav-langue a  { color: #ffd77a; font-weight: 600; }

/* --- Structure de page -------------------------------------------------- */

.enveloppe {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.titre-page {
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.2;
  margin: 0 0 .4rem;
  font-weight: 700;
}
.intro {
  margin: 0 0 1.5rem;
  color: var(--gris);
}
.compte {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--texte);
}

/* --- Carte -------------------------------------------------------------- */

.carte-cadre {
  height: 22rem;
  background: var(--encre-clair);
  border-radius: var(--rayon);
  overflow: hidden;
  margin-bottom: 2rem;
}
#carte { width: 100%; height: 100%; }

.carte-absente {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  color: #aab6c2;
  font-size: .95rem;
}

.carte-infobulle {
  font: inherit;
  color: var(--texte);
  max-width: 15rem;
  line-height: 1.4;
}
.carte-infobulle strong { display: block; margin-bottom: .2rem; }
.carte-infobulle a { color: var(--lien); }

/* Epingle Leaflet dessinee en CSS : aucune image a telecharger,
   et elle reprend l'ambre de l'enseigne. */
.epingle { background: none; border: 0; }
.epingle-point {
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--ambre);
  border: 2px solid var(--encre);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.leaflet-marker-icon:focus-visible .epingle-point,
.epingle:hover .epingle-point {
  background: var(--brique);
}

/* Le style de Leaflet impose sa propre police ; on remet celle du site. */
.leaflet-container { font: inherit; background: var(--encre-clair); }
.leaflet-popup-content { margin: .75rem .9rem; font: inherit; }
.leaflet-popup-content-wrapper { border-radius: var(--rayon); }

/* Invite affichee tant que la molette n'est pas activee. */
.leaflet-container:not(.leaflet-grab) { cursor: pointer; }

/* --- Liste des motels --------------------------------------------------- */

.liste { list-style: none; margin: 0; padding: 0; }

.fiche {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  margin-bottom: .75rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.fiche-logo {
  width: 100%;
  max-width: 11rem;
  border-radius: 2px;
}

.fiche-nom {
  font-size: 1.15rem;
  margin: 0 0 .25rem;
  font-weight: 700;
  line-height: 1.25;
}
.fiche-nom a { text-decoration: none; }
.fiche-nom a:hover { text-decoration: underline; }

.fiche-adresse {
  margin: 0 0 .6rem;
  color: var(--gris);
  font-size: .95rem;
  font-style: normal;
}

/* Le telephone est l'action principale : on lui donne la place. */
/* Points 0056 et 0065 : 1.05rem -> 0.74rem, soit -30 %. */
.tel {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  color: var(--encre);
  text-decoration: none;
  border-bottom: 3px solid var(--ambre);
  padding-bottom: 1px;
}
.tel:hover { border-bottom-color: var(--encre); }

.fiche-liens {
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

/* Point 0044 : compacte pour que Localiser / La fiche / Site web tiennent
   sur une seule ligne dans une case de grille. */
.bouton {
  display: inline-block;
  padding: .35rem .55rem;
  font-size: .82rem;
  white-space: nowrap;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--papier);
  color: var(--texte);
  text-decoration: none;
}
.bouton:hover { border-color: var(--gris); }
.bouton-plein {
  background: var(--encre);
  border-color: var(--encre);
  color: var(--blanc);
}
.bouton-plein:hover { background: var(--encre-clair); }

/* --- Fiche individuelle ------------------------------------------------- */

.fil { font-size: .9rem; color: var(--gris); margin: 0 0 1rem; }
.fil a { color: var(--gris); }

.detail-tete {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.detail-tete .tel { font-size: .8rem; }   /* point 0065 : -30 % */

.detail-meta { list-style: none; margin: 1rem 0 0; padding: 0; }
.detail-meta li {
  display: flex;
  gap: .75rem;
  padding: .5rem 0;
  border-top: 1px solid var(--trait);
  font-size: .95rem;
}
.detail-meta dt, .detail-meta .cle {
  flex: 0 0 7.5rem;
  color: var(--gris);
}

.voisins { margin-top: 2.5rem; }
.voisins h2 { font-size: 1.1rem; margin: 0 0 .75rem; }

/* --- Avis / notes ------------------------------------------------------- */

.avis {
  background: #fff8e8;
  border-left: 4px solid var(--ambre);
  padding: .9rem 1rem;
  margin: 0 0 1.5rem;
  font-size: .95rem;
  border-radius: 0 var(--rayon) var(--rayon) 0;
}

/* --- Pied de page ------------------------------------------------------- */

.pied {
  background: var(--encre);
  color: #b9c4cf;
  margin-top: 2rem;
  font-size: .92rem;
}
/* Point 0057 : pas de limite a 64rem ici, sinon la phrase casse en deux
   lignes alors qu'il reste de la place a l'ecran. */
.pied-avis, .pied-suivez {
  margin: 0 auto;
  padding: 0 1.5rem;
}
.pied-avis { font-size: .88rem; }
.pied-avis {
  padding-top: 2rem;
  line-height: 1.6;
}
.pied-suivez { padding-top: .75rem; padding-bottom: 1rem; }
/* Sur fond bleu nuit, le bleu de lien serait illisible : on eclaircit. */
.pied a { color: #9ec7f5; }
.pied-titre {
  color: var(--blanc);
  font-weight: 600;
  margin: 0 0 .35rem;
}
.pied p { margin: 0 0 .35rem; }
.pied-note { color: #8695a3; }
.pied-bas {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  border-top: 1px solid var(--encre-clair);
  color: #8695a3;
}

/* --- Tableau des evenements --------------------------------------------- */

.tableau-enveloppe { overflow-x: auto; }
table.evenements {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
  font-size: .95rem;
}
table.evenements th, table.evenements td {
  text-align: left;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--trait);
}
table.evenements th { background: var(--papier); font-weight: 600; }

/* --- Ecrans plus larges ------------------------------------------------- */

@media (min-width: 34rem) {
  .fiche {
    grid-template-columns: 11rem 1fr;
    align-items: start;
    gap: 1.25rem;
    padding: 1.25rem;
  }
  .carte-cadre { height: 26rem; }
}

@media (min-width: 52rem) {
  .carte-cadre { height: 30rem; }
}

/* --- Preferences d'affichage -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .entete, .nav, .carte-cadre, .pied, .fiche-liens { display: none; }
  .fiche { border: none; border-bottom: 1px solid #999; page-break-inside: avoid; }
  body { background: #fff; }
}

/* --- Slogan (point 020) ------------------------------------------------- */

.slogan {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gris);
}

/* --- Bannieres des annuaires partenaires -------------------------------- */

.seolnk {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.seolnk img { border: 0; }


/* --- Quoi faire a Montreal (points 011 et 012) --------------------------- */

.tourisme-titre {
  font-size: 1.2rem;
  margin: 2.25rem 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--ambre);
}

.tourisme { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }

.tourisme-item {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 1rem 1.15rem;
}
.tourisme-item h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.tourisme-item p  { margin: 0; }
.tourisme-hote {
  margin-top: .4rem !important;
  font-size: .85rem;
  color: var(--gris);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 46rem) {
  .tourisme { grid-template-columns: 1fr 1fr; }
}

/* --- Point 0028 : bande bleue de titre ---------------------------------- */

/* Reprend le bleu de headingBg.png de l'ancien site, en CSS plutot qu'en
   image : net a toutes les tailles d'ecran, et aucun fichier a charger. */
.bande-titre {
  background: var(--bleu-bande);
  color: #f7eee2;
  font-size: 1.05rem;
  font-weight: 700;
  font-style: italic;
  margin: 1.75rem 0 1rem;
  padding: .55rem 1rem;
  border-radius: 2px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.bande-compte {
  font-style: normal;
  font-weight: 600;
  font-size: .9rem;
  opacity: .85;
  font-variant-numeric: tabular-nums;
}

/* --- Point 0027 : texte de presentation --------------------------------- */

/* Point 0058 : texte courant, sans encadre blanc, comme la page Quoi faire. */
.presentation {
  margin-bottom: 1.5rem;
  color: var(--gris);
}
.presentation p { margin: 0 0 .8rem; }
.presentation p:last-child { margin-bottom: 0; }

/* --- Point 0030 : trois fiches par ligne -------------------------------- */

.liste-grille {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  align-items: stretch;
}
.liste-grille .fiche {
  grid-template-columns: 1fr;
  margin-bottom: 0;
  text-align: left;
}
.liste-grille .fiche-logo { max-width: 100%; }
.liste-grille .pub-ligne { display: flex; align-items: center; justify-content: center; }

@media (min-width: 34rem) {
  .liste-grille { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 56rem) {
  /* Trois par ligne, comme l'ancien site. */
  .liste-grille { grid-template-columns: repeat(3, 1fr); }
}

/* L'enveloppe des pages doit rester lisible par-dessus le fond noir. */
.enveloppe {
  background: var(--papier);
}

/* --- Point 0042 : menu burger en mobile -------------------------------- */

/* Pilote par une case a cocher masquee : aucun JavaScript, donc le menu
   fonctionne meme si le navigateur en bloque l'execution. */
.nav-bascule { position: absolute; opacity: 0; pointer-events: none; }

.nav-burger {
  display: none;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1rem;
  color: #d6dee6;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  user-select: none;
}
.nav-burger-trait,
.nav-burger-trait::before,
.nav-burger-trait::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: '';
  position: relative;
}
.nav-burger-trait::before { top: -6px; position: absolute; }
.nav-burger-trait::after  { top:  6px; position: absolute; }

@media (max-width: 47rem) {
  .nav-burger { display: flex; }

  .nav > ul {
    display: none;
    flex-direction: column;
    padding: 0 0 .5rem;
  }
  .nav-bascule:checked ~ ul { display: flex; }

  .nav > ul a {
    padding: .7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .nav > ul a[aria-current="page"] {
    border-bottom-color: var(--ambre);
  }
  .nav-langue, .nav-quebec { margin-left: 0; }

  /* Le clavier doit voir ou se trouve le focus sur le burger. */
  .nav-bascule:focus-visible ~ .nav-burger {
    outline: 3px solid var(--ambre);
    outline-offset: -3px;
  }
}

/* --- Points 0064 : titres en texte simple, hors bande bleue -------------- */

.titre-liste {
  font-size: 1.25rem;
  margin: 2rem 0 .5rem;
  font-weight: 700;
}
.titre-secteur {
  font-size: 1.05rem;
  margin: 1.75rem 0 .75rem;
  font-weight: 700;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--trait);
}
.titre-liste .compte, .titre-secteur .compte {
  font-weight: 600;
  color: var(--gris);
}
