/* ==========================================================================
   segema-theme.css v3 (2026-12) - Habillage visuel du site segema.fr
   --------------------------------------------------------------------------
   Charge APRES responsive.css (via modele/meta-viewport.php).
   Ne change que l'apparence : aucun texte, titre, lien ou adresse de page.
   - Partie A : toutes pages, tous ecrans (couleurs, liens, titres)
   - Partie B : toutes pages, PC/tablette >= 769px (en-tete, fond, colonnes)
     (le mobile <= 768px reste gere par responsive.css + hamburger.js)
   - Partie C : page d'accueil (blocs .seg-home), tous ecrans
   Couleurs : anthracite du logo #514c49 / #2b2e31, rouge du logo #d2232a,
   liens bleu acier #1d5a96.
   ========================================================================== */

/* ---------- A. Toutes pages, tous ecrans ------------------------------- */

a:link,
a:visited {
  color: #1d5a96;
}
a:hover,
a:focus {
  color: #d2232a;
  text-decoration: underline;
}

h1 {
  color: #2b2e31;
  letter-spacing: -0.01em;
}
h2, h3 {
  color: #2b2e31;
}

/* ---------- B. En-tete et cadre general (PC / tablette) ---------------- */
@media screen and (min-width: 769px) {

  /* Cadre exterieur des pages (tables Dreamweaver) : centre, 1500px max,
     sans bandes visibles (fond identique) ; la barre de menu et le liseré
     rouge s'etendent sur toute la largeur de l'ecran. */
  body > table {
    background: #fff !important;
    max-width: 1500px !important;
    margin: 0 auto !important;
    float: none !important;
  }
  body {
    background: #fff;
  }
  table.seg-header > tbody > tr:nth-child(3) {
    box-shadow: 0 -100vmax 0 100vmax #2b2e31, 0 3px 0 100vmax #d2232a;
    clip-path: inset(0 -100vmax -3px -100vmax);
  }
  table.seg-header {
    border-bottom: 0 !important;
    box-shadow: none !important;
  }
  .seg-home-cell {
    background: #fff !important;
  }

  /* --- En-tete (modele/haut.php) --- */
  table.seg-header {
    background: #fff !important;
    border-collapse: collapse;
    border-spacing: 0;
    border-bottom: 3px solid #d2232a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  }
  table.seg-header > tbody > tr > th,
  table.seg-header > tbody > tr > td {
    background: #fff;
    padding: 8px 10px;
    vertical-align: middle;
  }
  table.seg-header img {
    display: block;
  }

  /* Telephone */
  table.seg-header .seg-tel {
    white-space: nowrap;
    font-size: 17px;
    font-weight: 700;
    color: #2b2e31;
  }
  table.seg-header .seg-tel a {
    color: #2b2e31;
    text-decoration: none;
  }
  table.seg-header .seg-tel a:hover {
    color: #d2232a;
  }

  /* Liens « mots-cles » de l'en-tete : conserves, plus discrets */
  table.seg-header .Style19,
  table.seg-header .Style19 a {
    font-size: 12px !important;
    font-weight: 400;
    color: #6b7075 !important;
    line-height: 1.6;
  }
  table.seg-header .Style19 a:hover {
    color: #d2232a !important;
  }

  /* Groupe SEGEMA / References */
  table.seg-header td.Style3,
  table.seg-header td.Style3 a {
    font-size: 13px;
    color: #2b2e31;
  }

  /* Barre de navigation produits (3e ligne) */
  table.seg-header > tbody > tr:nth-child(3) > th,
  table.seg-header > tbody > tr:nth-child(3) > td {
    background: #2b2e31 !important;
    padding: 0;
    border: 0;
  }
  table.seg-header > tbody > tr:nth-child(3) {
    background: #2b2e31 !important;
  }
  table.seg-header > tbody > tr:nth-child(3) > th {
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 0 16px;
    text-align: left;
  }
  table.seg-header > tbody > tr:nth-child(3) p {
    margin: 0;
  }
  table.seg-header > tbody > tr:nth-child(3) .Style13 a {
    display: block;
    padding: 15px 12px 13px;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: background-color .15s ease;
  }
  table.seg-header > tbody > tr:nth-child(3) .Style13 a:hover,
  table.seg-header > tbody > tr:nth-child(3) .Style13 a:focus {
    background: #3a3e42;
    border-bottom-color: #d2232a;
  }

  /* Bouton Contact */
  table.seg-header > tbody > tr:nth-child(3) > td:last-child a {
    display: inline-block;
    margin: 7px 10px;
    padding: 9px 22px;
    background: #d2232a;
    color: #fff !important;
    border-radius: 4px;
    font-size: 15px;
    text-decoration: none;
  }
  table.seg-header > tbody > tr:nth-child(3) > td:last-child a:hover {
    background: #b01c22;
  }

  /* Colonne de menu de gauche des pages produits : gris adouci */
  body > table > tbody > tr:nth-of-type(2) > th:first-child,
  body > table > tbody > tr:nth-of-type(2) > td:first-child {
    background-color: #e3e6e9 !important;
  }

  /* Plan du site (plan-web.php) : listes sans puces decalees */
  ul.Style67 {
    list-style: none;
    padding-left: 0;
  }
}

/* ---------- C. Page d'accueil (index.php) ------------------------------ */

.seg-home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 8px;
  text-align: left;
  font-weight: 400;
  color: #2b2e31;
}
.seg-home * {
  box-sizing: border-box;
}

/* Bandeau d'accroche */
.seg-hero {
  display: flex;
  align-items: stretch;
  background: #2b2e31;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
}
.seg-hero-text {
  flex: 1 1 52%;
  padding: 40px 40px 36px;
  color: #fff;
}
.seg-hero-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  background: #d2232a;
  color: #fff;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.seg-hero-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
}
.seg-hero-sub {
  margin: 0 0 24px;
  color: #d6d9dc;
  font-size: 17px;
}
.seg-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.seg-home a.seg-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.seg-home a.seg-btn-primary {
  background: #d2232a;
  color: #fff;
}
.seg-home a.seg-btn-primary:hover {
  background: #b01c22;
  color: #fff;
}
.seg-home a.seg-btn-ghost {
  border: 2px solid #fff;
  color: #fff;
  padding: 10px 20px;
}
.seg-home a.seg-btn-ghost:hover {
  background: #fff;
  color: #2b2e31;
}
.seg-hero-img {
  flex: 1 1 48%;
  min-height: 300px;
  background: #ccc url("images/accueil-2026/rack-stockage-barres-tiroirs-segema.jpg") center 40% / cover no-repeat;
}

/* Paragraphe d'introduction (texte existant) */
.seg-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  background: #fff;
  border-radius: 8px;
  padding: 20px 28px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.seg-intro p {
  flex: 1 1 320px;
  margin: 0;
  font-size: 16px;
}
.seg-intro ul {
  flex: 1 1 300px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.seg-intro li {
  position: relative;
  padding: 3px 0 3px 26px;
  font-size: 16px;
  font-weight: 600;
}
.seg-intro li:before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 10px;
  height: 6px;
  border-left: 3px solid #d2232a;
  border-bottom: 3px solid #d2232a;
  transform: rotate(-45deg);
}

/* Titre de section (H1 existant) */
.seg-home h1.seg-h1 {
  margin: 0 0 4px;
  font-size: 28px;
  text-align: center;
}
.seg-home p.seg-lead {
  margin: 0 0 22px;
  text-align: center;
  color: #5c6166;
  font-size: 16px;
}

/* Cartes produits */
.seg-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.seg-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  border-top: 4px solid #d2232a;
  transition: box-shadow .15s ease, transform .15s ease;
}
.seg-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
  transform: translateY(-2px);
}
.seg-card-imgs {
  display: flex;
  gap: 6px;
  padding: 12px 12px 0;
}
.seg-card-imgs a {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  background: #fff;
}
.seg-card-imgs img {
  max-width: 100%;
  max-height: 140px;
  width: auto !important;
  height: auto !important;
}
.seg-home .seg-card h2 {
  margin: 14px 16px 6px;
  font-size: 19px;
  line-height: 1.25;
}
.seg-home .seg-card h2 a {
  color: #2b2e31;
  text-decoration: none;
}
.seg-home .seg-card h2 a:hover {
  color: #d2232a;
}
.seg-home a.seg-card-more {
  margin: auto 16px 16px;
  padding-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #d2232a;
  text-decoration: none;
}
.seg-home a.seg-card-more:hover {
  text-decoration: underline;
}

/* Bande d'atouts */
.seg-atouts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  margin-bottom: 28px;
}
.seg-atout {
  padding: 20px 22px;
  border-left: 1px solid #e4e6e8;
}
.seg-atout:first-child {
  border-left: 0;
}
.seg-atout strong {
  display: block;
  font-size: 22px;
  color: #d2232a;
  line-height: 1.2;
}
.seg-atout span {
  display: block;
  font-size: 14px;
  color: #5c6166;
  margin-top: 2px;
}

/* Bandeau devis bas de page */
.seg-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border: 2px solid #2b2e31;
  border-radius: 8px;
  padding: 20px 28px;
  margin-bottom: 24px;
}
.seg-cta p {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}
.seg-cta .seg-btns a.seg-btn-ghost {
  border-color: #2b2e31;
  color: #2b2e31;
}
.seg-cta .seg-btns a.seg-btn-ghost:hover {
  background: #2b2e31;
  color: #fff;
}

/* Colonne vide de gauche de l'accueil : masquee sur PC */
@media screen and (min-width: 769px) {
  th.seg-side-empty {
    display: none;
  }
}

/* Tablette */
@media screen and (max-width: 1024px) {
  .seg-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .seg-atouts {
    grid-template-columns: repeat(2, 1fr);
  }
  .seg-atout:nth-child(3) {
    border-left: 0;
  }
  .seg-atout:nth-child(n+3) {
    border-top: 1px solid #e4e6e8;
  }
}

/* Mobile : responsive.css compacte tout en !important ; on retablit
   les espacements des blocs d'accueil uniquement (.seg-home). */
@media screen and (max-width: 768px) {
  .seg-home .seg-hero-img {
    display: block !important;
    min-height: 200px !important;
  }
  .seg-home .seg-hero-title {
    margin: 0 0 10px !important;
    line-height: 1.2 !important;
  }
  .seg-home .seg-hero-kicker {
    margin: 0 0 12px !important;
  }
  .seg-home .seg-hero-sub {
    margin: 0 0 18px !important;
    line-height: 1.4 !important;
  }
  .seg-home .seg-intro ul {
    padding-left: 0 !important;
    margin: 6px 0 0 !important;
  }
  .seg-home .seg-intro li {
    padding: 3px 0 3px 26px !important;
    line-height: 1.4 !important;
  }
  .seg-home .seg-intro p,
  .seg-home p.seg-lead {
    line-height: 1.45 !important;
  }
  .seg-home h1.seg-h1 {
    margin: 8px 0 4px !important;
  }
  .seg-home p.seg-lead {
    margin: 0 0 16px !important;
  }
  .seg-home .seg-card h2 {
    margin: 12px 16px 4px !important;
    font-size: 19px !important;
  }
  .seg-home a.seg-card-more {
    margin: 4px 16px 16px !important;
    font-size: 15px !important;
  }
  body > table .seg-home .seg-card-imgs img {
    margin: 0 auto !important;
    max-width: 100% !important;
    max-height: 140px !important;
  }
  .seg-home .seg-card h2 a {
    font-size: 19px !important;
  }
  .seg-home .seg-atout span,
  .seg-home .seg-cta p {
    line-height: 1.35 !important;
  }
  .seg-home .seg-atout {
    padding: 14px 14px !important;
  }
  .seg-home .seg-atout strong {
    font-size: 19px !important;
  }
  .seg-home a.seg-btn {
    font-size: 15px !important;
  }
  .seg-home {
    padding: 12px 6px 4px;
  }
  .seg-hero {
    flex-direction: column-reverse;
  }
  .seg-hero-img {
    min-height: 200px;
  }
  .seg-hero-text {
    padding: 24px 20px;
  }
  .seg-hero-title {
    font-size: 24px;
  }
  .seg-cards {
    grid-template-columns: 1fr;
  }
  .seg-intro,
  .seg-cta {
    padding: 16px;
  }
}
