/**
 * Theme Name:        crearv_resto
 * Theme URI:         https://example.com/crearv_resto
 * Description:       thème pour restaurant
 * Version:           1.0.0
 * Author:            crearv
 * Author URI:        https://crearv.fr
 * Tags:              food-and-drink
 * Text Domain:       crearv_resto
 * Domain Path:       /assets/lang
 * Tested up to:      6.4
 * Requires at least: 6.2
 * Requires PHP:      7.4
 * License:           GNU General Public License v2.0 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 */

 .colEquipe {
    height: 150px;
 }
 
 .justify {
     text-align: justify;
 }

  
 .minwidth25 {
     min-width: 25%;
 }
 
 .minwidth40 {
     min-width: 40%;
 }
 
 .minwidth50 {
     min-width: 50%;
 }
 
 .maxwidth80 {
     max-width: 80% !important;
 }
 
 .width100 {
     width: 100%;
 }

 .white a {
      color: #FFFEF6 !important;
 }
.localisation-pc { display: none; }
 .localisation-mobile { display: block; }


@media (min-width: 768px) {
  	.localisation-pc { display: block; }
	.localisation-mobile { display: none; }
}
 
 @media screen and (min-width: 782px)
{
	.heighthistory {
	    height: 600px;
	}
	
    .maxwidth80XL {
     max-width: 80% !important;
    }
    
    .minwidth25XL {
     min-width: 25%;
 }
}

.custom-post-card {
  transform: rotate(calc(-5deg + 10deg * var(--random)));
  background: #fdfdfd;
  padding: 1rem;
  margin: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.random-layout-container {
  position: relative;
  overflow: hidden;
}

.random-article {
  position: absolute;
  width: 200px;
  background: #FFFEF6;
  padding: 10px;
  box-shadow: 0 2px 8px #E9E1A7;
  color: #0A0A0B;
  border-radius: 8px;
  z-index: 1;
  /* Animation fluide */
  transition: left 0.5s ease, top 0.5s ease, transform 0.5s ease;
}

.random-layout-container.single-column {
  display: flex;
  flex-direction: column;
  align-items: center; /* ← centrer horizontalement les enfants */
  gap: 20px;
}

.random-layout-container.single-column .random-article {
  margin: 0 auto;
}

.ti-widget.ti-wp-testimonial-2 .ti-widget-container, .ti-widget.ti-wp-testimonial-2 .ti-widget-container * {
  font-family: 'Arapey', 'Open Sans', sans-serif !important;
  text-align: justify !important;
  color:#fdfdfd;
}

.ti-widget.ti-wp-testimonial-2 .ti-review-item>.ti-inner, .ti-widget.ti-wp-testimonial-2 .ti-load-more-reviews-container .ti-load-more-reviews-button {
  border-top: 2px #F1EFE1 solid !important;
  border-bottom: 2px #F1EFE1 solid !important;
  border-left: 0px #F1EFE1 solid !important;
  border-right: 0px #F1EFE1 solid !important;
  border-radius: 0px !important ;
  background-color: #0A0A0B !important;
}

.ti-profile-img {
  display: none !important; /* Cacher l'image de profil */
}

.ti-date, .ti-widget.ti-wp-testimonial-2 .ti-widget-container{
  color: #fdfdfd !important; /* Couleur de la date */
}


.ti-widget.ti-wp-testimonial-1 .ti-reviews-container .ti-reviews-container-wrapper{
  margin: 15px !important;
}
.ti-widget .ti-wp-testimonial-1 .ti-no-logo, .ti-reviews-container-wrapper {
  background-color: #0A0A0B;
  color: #fdfdfd;
}

.ti-widget.ti-wp-testimonial-1 .ti-widget-container, .ti-widget.ti-wp-testimonial-1 .ti-widget-container * {
  font-family: 'Arapey', 'Open Sans', sans-serif !important;
  text-align: justify !important;
}

.ti-widget.ti-wp-testimonial-1 .ti-review-item>.ti-inner {
  background-color: #0A0A0B !important;
  border-color: #F1EFE1 !important;
  box-shadow: 1px 1px 7px 0px #F1EFE1, 0px 0px 2px 0px #0A0A0B !important;
}

.ti-widget.ti-wp-testimonial-1 .ti-widget-container .ti-name {
  color: #F1EFE1 !important; /* Couleur du nom */
}

/*formulaire*/
/* Desktop (≥ 1024px) */
@media (min-width: 1024px) {
    .wp-block-contact-form-7-contact-form-selector {
        width: 100%;
        padding: 15px;
    }
}

.wp-block-contact-form-7-contact-form-selector {
  margin: 15px !important;
  max-width: 600px;
  background-color: #0A0A0B;
  color: #0A0A0B;
  border-radius: 8px;
  padding: 0px !important;
  border-color: #F1EFE1 !important;
  box-shadow: 1px 1px 7px 0px #F1EFE1, 0px 0px 2px 0px #0A0A0B !important;
}

form p {
    color: #FFFEF6;
}

.wpcf7-form-control-wrap {
  margin-bottom: 1.5rem;
}
.wpcf7-form-control.wpcf7-text, .wpcf7-form-control.wpcf7-textarea, .wpcf7-form-control.wpcf7-select, .wpcf7-form-control.wpcf7-number,
 .wpcf7-form-control.wpcf7-email, .wpcf7-form-control.wpcf7-url, .wpcf7-form-control.wpcf7-tel, .wpcf7-form-control.wpcf7-radio {
  width: 80%;
}

#note {
  display: block;
}

.wpcf7-form-control {
		border: none;
		background-color: #F1EFE1;
		border-radius: 15px;
		padding-top: 10px;
		padding-left: 10px;
		padding-bottom: 5px;
		box-shadow: 0 0 10px #E9E1A7 inset;
    color:#0A0A0B;
	}
	.wpcf7-form .wpcf7-form-control:focus {
		border: 2px solid #fdfdfd;
		outline: none; /* supprime css defaut du navigateur */
	}
	.wpcf7-form p {
		margin-bottom: 1.5rem;
		margin-top: 2rem;
    text-align: center;
    text-align: -webkit-center;
	}

	#onglet1, #onglet2, #onglet3, #texte1, #texte2, #texte3 {
		width: 60%;
		margin: inherit;
	}
	.wpcf7-acceptance {
		padding-right: 20px;
	}
	input:-internal-autofill-selected, #sujet:autofill, #message:autofill {
		background-color: #F1EFE1 !important;
		outline: none; /* supprime css defaut du navigateur */
	}
	input[type=submit]:hover, input[type=reset]:hover {
	 background-color: #E9E1A7;
	 }
	input[type=submit]:active, input[type=reset]:active {
	 background-color: #E9E1A7;
	 box-shadow: 1px 1px 1px #F1EFE1 inset;
	}
	/* message validation */
	.wpcf7 form.sent .wpcf7-response-output,
	.wpcf7 form.spam .wpcf7-response-output,
	.wpcf7 form.invalid .wpcf7-response-output,
	.wpcf7 form.unaccepted .wpcf7-response-output,
	.wpcf7 form.failed .wpcf7-response-output,
	.wpcf7 form.aborted .wpcf7-response-output {
		border-radius: 5px;
		color: white;
	}
	.wpcf7 form.invalid .wpcf7-response-output,
	.wpcf7 form.unaccepted .wpcf7-response-output,
	.wpcf7 form.failed .wpcf7-response-output,
	.wpcf7 form.aborted .wpcf7-response-output {
		color:red;
		border: 2px solid #E9E1A7;
	}

  a:where(:not(.wp-element-button)) {
    color: #0A0A0B;
    text-decoration: none;
  }

  /* reservation */
#calendar-nav button {
  background-color: #0A0A0B;
  color: #FFFEF6;
  border: 2px solid #E9E1A7;
  padding: 8px 20px;
  border-radius: 25px;
  cursor: pointer;
 
}

#calendar-nav button img {
  width: 30px !important;
  height: 30px !important;
}

#calendar-nav span{
  text-transform: uppercase;
  font-weight: bold;
}

#reservation-calendar th {
  background-color: #E9E1A7;
  color: #0A0A0B;
}

.outside-month {
    color: #aaa;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10%;
    width: 50%;
    height: 50%;
    margin:auto;
}

#reservation-form {
	max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	}

#reservation-form label {
  color: black;
  width: 100% ;
}

#reservation-form input[type="text"],
#reservation-form input[type="email"],
#reservation-form input[type="time"],
#reservation-form input[type="datetime-local"],
#reservation-form input[type="number"],
#reservation-form textarea,
#reservation-form input[type="submit"] {
    width: 100%;
    margin-bottom: 15px;
    box-sizing: border-box;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0 0 10px #E9E1A7 inset;
}


/*insta*/
.ti-card-body {
    background-color: #0A0A0B;
}
.ti-username, .ti-post-text {
    color: #FFFEF6 !important;
}

.ti-readmore {
    color: #E9E1A7 !important;
}

.ti-widget[data-wkey="feed-instagram"][data-style=custom-style] header[data-header-type="3"] .ti-widget-header .ti-profile .ti-header-numbers .ti-number .ti-value, 
.ti-widget[data-wkey="feed-instagram"][data-style=custom-style][data-widget-type=social] .ti-header-numbers
{
    color: #F1EFE1 !important;
}

.ti-widget[data-wkey="feed-instagram"] .ti-layout-container .ti-widget-layout {
    justify-content: center;
    padding: 15px;
}

.ti-layout-item {
    border-color: #F1EFE1 !important;
    border-style: solid !important;
    border-width: 1px !important;
    border-radius: 25px !important;
    padding: 0 !important;
    margin-right: 5px !important;
    margin-left: 5px !important;
}

.ti-widget[data-wkey="feed-instagram"][data-style=custom-style][data-widget-type=social] .ti-widget-card {
    border: 0!important;
}

.ti-widget-card {
    background-color: #F1EFE1 !important;
    border: 0;
    border-radius: 25px !important;
}

.ti-widget[data-wkey="feed-instagram"][data-col="4"] .ti-layout-item {
    flex: 0 0 calc(90% / 4) !important;
    width: calc(90% / 4) !important;
}

.ti-header-btn {
    border: solid 2px #E9E1A7;
}

.ti-btn {
    border: solid 2px #E9E1A7;
}

.ti-widget[data-wkey="feed-instagram"][data-style=custom-style][data-widget-type=social] .ti-widget-header .ti-header-btn .ti-btn {
    background-color: #0A0A0B !important;
    color: #FFFEF6 !important;
    border-radius: 25px !important;
    border: solid 2px #E9E1A7 !important;
}

.ti-widget[data-wkey="feed-instagram"][data-style=custom-style][data-widget-type=social] .ti-widget-header .ti-header-btn .ti-btn:hover {
    outline-style: none !important;
    text-decoration: underline;
}

.ti-post-content {
    background-color: #0A0A0B !important;
}

.ti-widget[data-wkey="feed-instagram"][data-style=custom-style][data-widget-type=social] .ti-card-header .ti-platform:before {
    background-color: #FFFEF6 !important;
}

 @media screen and (max-width: 782px)
{
	/* Fond et texte du menu */
    .wp-site-blocks, .wp-block-navigation__responsive-dialog {
        background-color: #0A0A0B !important; /* fond noir */
        color: #FFFEF6; /* texte blanc cassé */
    }
    
    .wp-block-navigation__responsive-container-close {
        position: absolute;
        right: 10px;
        top: 10px;
        z-index: 2;
    }
    
    .wp-block-navigation__responsive-container {
        
    }
    
    .wp-block-navigation.items-justified-right {
        --navigation-layout-justification-setting: center;
        --navigation-layout-justify: flex-end;
        padding: 10px;
    }
}

/* Grille responsive WordPress post-template */
.pageEvent .wp-block-post-template.is-layout-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr; /* Mobile = 1 colonne */
}

/* Tablette (≥ 768px) */
@media (min-width: 768px) {
  .pageEvent .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
  }
}

/* Desktop (≥ 1024px) */
@media (min-width: 1024px) {
  .pageEvent .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
  }
  .pageEvent .wp-block-post-template.is-layout-grid img, .accueilEvent .wp-block-post-template.is-layout-grid img{
      height: 300px;
  }
  .pageEvent .wp-block-columns p {
      --lines: 10;   /* nb de lignes visibles */
      --lh: 1.5;    /* line-height utilisé */
      line-height: var(--lh);
      max-height: calc(var(--lines) * 1em * var(--lh));
      overflow: hidden;
      position: relative;
    
      /* fade-out en bas (préserve la justification) */
      -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
              mask-image: linear-gradient(180deg, #000 70%, transparent);
    }
    
    .accueilEvent .wp-block-columns .text-event {
        --lines: 3;   /* nb de lignes visibles */
          --lh: 1.5;    /* line-height utilisé */
          line-height: var(--lh);
          max-height: calc(var(--lines) * 1em * var(--lh));
          overflow: hidden;
          position: relative;
    }
   
    /* petit "…" en bas à droite */
/*    .pageEvent .wp-block-columns p::after, .accueilEvent .wp-block-columns .text-event::after {
      content: "…";
      position: absolute;
      right: .25rem;
      bottom: .15rem;
      font-weight: 600;
    }
*/
}

@media (min-width: 782px) {
    .pageEvent .wp-block-columns {
        flex-wrap: nowrap !important;
        min-height: 300px;
    }
}

/* Forcer chaque carte à s'étirer en hauteur */
.pageEvent .wp-block-post-template.is-layout-grid > li.wp-block-post, .accueilEvent .wp-block-post-template.is-layout-grid > li.wp-block-post {
  display: flex;
  flex-direction: column;
}

.pageEvent .wp-block-post-template.is-layout-grid > li.wp-block-post > .wp-block-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pageEvent .wp-block-columns p, .accueilEvent .wp-block-columns p {
      padding: 10px;
      text-align: justify;
}
.pageEvent .text-event {
	height: 500px;
	overflow: hidden;
}

.text-event img {
	max-height:16px !important;
}

.text-event p {
	padding: 5px !important;
	padding-right: 10px !important;
}

.temoignages-vide {
    text-align: center;
    font-size: var(--wp--preset--font-size--x-large) !important;
}

.temoignages-vide p {
    font-size: var(--wp--preset--font-size--x-large) !important;
}

.temoignages-vide a {
    color: #FFFEF6;
}

/*allergènes*/
.allergen-info {
  max-width: 100%;
  overflow-x: auto;
  font-family: sans-serif;
}

.allergen-info table {
  border-collapse: collapse;
  width: 100%;
}

.allergen-info th, .allergen-info td {
  border: 1px solid var(--wp--preset--color--text);
  padding: 0.5em;
  text-align: center;
  background-color: inherit;
}

.allergen-info th[title] {
  cursor: help;
}

.allergen-info thead {
  border-color: var(--wp--preset--color--titre) !important;
}

/* --- Version desktop : tableau normal --- */
.allergen-info table {
  width: 100%;
  border-collapse: collapse;
}

/* --- Version mobile : affichage en cartes --- */
@media (max-width: 768px) {
  .allergen-info table,
  .allergen-info thead,
  .allergen-info tbody,
  .allergen-info th,
  .allergen-info td,
  .allergen-info tr {
    display: block;
  }

  /* On masque l’en-tête */
  .allergen-info thead {
    display: none;
  }

  /* Chaque ligne devient une carte */
  .allergen-info tr {
    margin: 0 5px 1.2rem 5px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-color: var(--wp--preset--color--titre) !important;
    border-radius: 8px;
    background: #0A0A0B !important;
  }

  /* Nom du plat */
  .allergen-info td:first-child {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    border: none;
    text-align: center; 
    justify-content: center;
  }

  /* Les cellules allergènes */
  .allergen-info td {
    display: flex;
    justify-content: space-between;
    padding: 4px;
  }

  /* On affiche le nom de l’allergène selon la colonne */ 
  .allergen-info td:nth-child(2)::before { content: "Gluten"; }
  .allergen-info td:nth-child(3)::before { content: "Lait"; }
  .allergen-info td:nth-child(4)::before { content: "Arachide"; }
  .allergen-info td:nth-child(5)::before { content: "Œuf"; }
  .allergen-info td:nth-child(6)::before { content: "Poisson"; } 
  .allergen-info td:nth-child(7)::before { content: "Crustacés"; } 
  .allergen-info td:nth-child(8)::before { content: "Soja"; } 
  .allergen-info td:nth-child(9)::before { content: "Fruits à coque"; } 
  .allergen-info td:nth-child(10)::before { content: "Céleri"; } 
  .allergen-info td:nth-child(11)::before { content: "Moutarde"; } 
  .allergen-info td:nth-child(12)::before { content: "Sulfites"; } 
  .allergen-info td:nth-child(13)::before { content: "Sésame"; } 
  .allergen-info td:nth-child(14)::before { content: "Lupin"; } 
  .allergen-info td:nth-child(15)::before { content: "Mollusques"; }

  /* Ajouter le label de l’allergène via data-label */
  .allergen-info td:not(:first-child)::before {
    font-weight: 600;
  }

}

.wp-block-query-pagination-numbers .page-numbers, .wp-block-query-pagination-next, .wp-block-query-pagination-previous {
    background-color: #0A0A0B;
    color: #FFFEF6;
    border-radius: 25px;
    border: solid 2px #E9E1A7;
    padding: 3px 12px;
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background-color: #E9E1A7;
    color: #0A0A0B;
}