/*
Theme Name: Textil'Art
Theme URI: https://www.textilart.ca
Description: Thème enfant de Twenty Twenty-Five reprenant l'identité visuelle de Textil'Art : palette tirée du logo, typographie Raleway et mise en page du site précédent.
Author: Astral Internet
Template: twentytwentyfive
Version: 1.0
Text Domain: textilart
*/

/* --- Vignette de date des nouvelles, comme sur l'ancien site --- */
.textilart-date {
  background: var(--wp--preset--color--orange);
  color: #fff;
  text-align: center;
  border-radius: 3px;
  padding: 0.55rem 0.75rem;
  line-height: 1.15;
  min-width: 4.5rem;
}
.textilart-date .jour  { display: block; font-size: 1.65rem; font-weight: 700; }
.textilart-date .mois  { display: block; font-size: 0.8rem; }
.textilart-date .annee { display: block; font-size: 0.7rem; opacity: 0.85; }

/* --- Bande de services de la page d'accueil --- */
.textilart-services .wp-block-column {
  text-align: center;
}
.textilart-services h3 {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

/* --- En-tête : coordonnées de la barre supérieure --- */
.textilart-entete-infos {
  font-size: 0.9rem;
}
.textilart-entete-infos a {
  text-decoration: none;
}
.textilart-entete-infos a:hover {
  text-decoration: underline;
}

/* --- Pied de page --- */
.textilart-pied a {
  color: #fff;
  text-decoration: none;
}
.textilart-pied a:hover {
  text-decoration: underline;
}

/* Le titre de page reprend le cyan des titres de l'ancien site */
.wp-block-post-title {
  color: var(--wp--preset--color--cyan);
}

/* --- Formulaire de contact (Contact Form 7) --- */
.textilart-formulaire {
  max-width: 640px;
}
.textilart-formulaire p {
  margin-bottom: 1.1rem;
}
.textilart-formulaire label {
  display: block;
  font-weight: 600;
  color: var(--wp--preset--color--marine);
  font-size: 0.95rem;
}
.textilart-formulaire .requis {
  color: var(--wp--preset--color--orange);
}
.textilart-formulaire .verif-question {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--wp--preset--color--texte);
}
.textilart-formulaire input[type="text"],
.textilart-formulaire input[type="email"],
.textilart-formulaire input[type="tel"],
.textilart-formulaire textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #c9d2d9;
  border-radius: 3px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--wp--preset--color--texte);
  background: #fff;
  box-sizing: border-box;
}
.textilart-formulaire input:focus,
.textilart-formulaire textarea:focus {
  outline: 2px solid var(--wp--preset--color--cyan);
  outline-offset: 1px;
  border-color: var(--wp--preset--color--cyan);
}
.textilart-formulaire textarea {
  min-height: 9rem;
  resize: vertical;
}
.textilart-formulaire input[type="submit"] {
  background: var(--wp--preset--color--orange);
  color: #fff;
  border: 0;
  border-radius: 3px;
  padding: 0.7rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.textilart-formulaire input[type="submit"]:hover {
  background: var(--wp--preset--color--orange-fonce);
}
.textilart-formulaire input[type="submit"]:focus-visible {
  outline: 2px solid var(--wp--preset--color--marine);
  outline-offset: 2px;
}
/* Retours de validation */
.wpcf7 form .wpcf7-response-output {
  border-width: 1px;
  border-radius: 3px;
  padding: 0.8rem 1rem;
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
}
.wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--wp--preset--color--cyan);
  background: var(--wp--preset--color--bleu-tres-pale);
}
.wpcf7-not-valid-tip {
  color: #b3261e;
  font-size: 0.85rem;
  font-weight: 400;
}
.wpcf7-spinner {
  vertical-align: middle;
}

/* Liens du pied de page */
.textilart-pied-liens {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
.textilart-pied-liens li {
  margin-bottom: 0.35rem;
}
.textilart-pied-liens a::before {
  content: "› ";
  opacity: 0.7;
}

/* --- Carrousel de l'accueil (bloc Galerie transformé) --- */
.wp-block-gallery.textilart-carrousel {
  position: relative;
  display: block;
  margin-top: 0;
  margin-bottom: 0;   /* les marges laterales restent a WordPress : c'est ce qui rend alignfull bord a bord */
  overflow: hidden;
}
.wp-block-gallery.textilart-carrousel figure.wp-block-image {
  margin: 0;
  width: 100%;
  flex: 0 0 100%;
}
.wp-block-gallery.textilart-carrousel figure.wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 323;
  object-fit: cover;
}
/* Sans JavaScript : seule la première image est visible */
.wp-block-gallery.textilart-carrousel:not(.est-actif) figure.wp-block-image:not(:first-child) {
  display: none;
}
.wp-block-gallery.textilart-carrousel.est-actif figure.wp-block-image[hidden] {
  display: none;
}

/* Flèches, dans l'esprit des chevrons de l'ancien site */
.textilart-carrousel__fleche {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--wp--preset--color--marine);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0.2rem;
  transition: background 0.15s;
}
.textilart-carrousel__fleche:hover,
.textilart-carrousel__fleche:focus-visible {
  background: var(--wp--preset--color--orange);
  color: #fff;
  outline: none;
}
.textilart-carrousel__fleche--prec { left: 1rem; }
.textilart-carrousel__fleche--suiv { right: 1rem; }

/* Points de navigation */
.textilart-carrousel__points {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.textilart-carrousel__point {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.textilart-carrousel__point[aria-selected="true"] {
  background: var(--wp--preset--color--orange);
  border-color: var(--wp--preset--color--orange);
}
.textilart-carrousel__point:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .textilart-carrousel__fleche { width: 2.1rem; height: 2.1rem; font-size: 1.5rem; }
  .textilart-carrousel__fleche--prec { left: 0.4rem; }
  .textilart-carrousel__fleche--suiv { right: 0.4rem; }
}

/* --- Contenu hérité de l'ancien site --- */
/* Les tableaux de mise en page de GI2 portent des largeurs fixes en pixels :
   on les rend fluides pour qu'ils ne débordent jamais de l'écran. */
.wp-block-post-content table {
  max-width: 100% !important;
  height: auto !important;
  table-layout: auto;
}
.wp-block-post-content table td,
.wp-block-post-content table th {
  max-width: 100%;
  height: auto !important;
}
.wp-block-post-content table img {
  max-width: 100% !important;
  height: auto !important;
}
@media (max-width: 700px) {
  /* Sur mobile, les cellules d'une grille d'images passent les unes sous les autres */
  .wp-block-post-content table.responsive_table,
  .wp-block-post-content table.responsive_table tbody,
  .wp-block-post-content table.responsive_table tr,
  .wp-block-post-content table.responsive_table td {
    display: block;
    width: 100% !important;
  }
}

/* --- Bandeau d'en-tête des pages intérieures --- */
/* Reprend le #entete_image_interne de l'ancien site : image pleine largeur à
   hauteur proportionnelle, suivie du liseré de denim. Masqué sur mobile comme
   l'original : un bandeau de 1920x123 y serait illisible. */
.textilart-entete-page {
  margin-top: 0;
}
.textilart-entete-page .wp-block-post-featured-image {
  margin-top: 0;
  margin-bottom: 0;   /* marges laterales laissees a WordPress pour le bord a bord */
}
.textilart-entete-page .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}
/* Le liseré de denim, uniquement si un bandeau est affiché */
.textilart-entete-page .wp-block-post-featured-image:not(:empty)::after {
  content: "";
  display: block;
  height: 10px;
  background: url("assets/separateur-denim.png") repeat-x center / auto 10px;
}
@media (max-width: 782px) {
  .textilart-entete-page {
    display: none;
  }
}
/* Même liseré sous le carrousel de l'accueil, comme sur l'ancien site */
.wp-block-gallery.textilart-carrousel::after {
  content: "";
  display: block;
  height: 10px;
  background: url("assets/separateur-denim.png") repeat-x center / auto 10px;
}
