/*!
Theme Name: Ultras-Typos-Theme
Theme URI: https://ultras-typos.com/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
*/


/* ==================================================
   RESET
================================================== */

*{
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
	scroll-behavior: smooth;
}

body {
    font-family: sans-serif;
    color: #111;
    font-size: 1rem;
    line-height: 1.6;
    text-wrap: pretty;
}

h1,h2,h3,h4,h5,h6{
  font-size: inherit;
  font-weight: normal;
}

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

a {
    color: inherit;
    text-decoration: none;
}
a[href^="mailto:"] {
    white-space: nowrap;
}

ol, ul, li {
    list-style: none;
    padding-inline-start: unset;
}

button{
    background-color: transparent;
    border: none;
}


@font-face {
  font-family: "Ronzino-Bold";
  src:
  url("/wp-content/themes/ultras-typos-theme/fonts/Ronzino-Bold.woff2") format('woff');
}
@font-face {
  font-family: "Ronzino-Medium";
  src:
  url("/wp-content/themes/ultras-typos-theme/fonts/Ronzino-Medium.woff2") format('woff');
}
@font-face {
  font-family: "Ronzino-Regular";
  src:
  url("/wp-content/themes/ultras-typos-theme/fonts/Ronzino-Regular.woff2") format('woff');
}
@font-face {
  font-family: "Ronzino-Oblique";
  src:
  url("/wp-content/themes/ultras-typos-theme/fonts/Ronzino-Oblique.woff2") format('woff');
}

h1,h2,h3,h4,h5,h6{
	font-family: Ronzino-Medium;
}
p, a, span{
	font-family: Ronzino-Regular;
}



/* ==================================================
   HEADER (CENTRÉ)
================================================== */

.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url("/wp-content/themes/ultras-typos-theme/images/UT-BANNIERE-2.jpg");
	background-size: cover;
}

#logo {
    max-height: 14vh;
    padding: 4vh 0;
}
@media (max-width: 768px) {

    #logo {
        padding: 2rem 1rem;
    }

}

.site-header nav{
    width:100%;
	background-color: white;
	border-top: 2px solid #222;
	border-bottom: 2px solid #222;
}

.site-header nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.site-header nav ul li{
	text-align:center;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
}
.site-header nav ul li:hover{
	border-top: 4px solid #222;
	border-bottom: 4px solid #222;
}

.site-header nav a {
    font-size: 1.2rem;
    font-family: Ronzino-Medium;
    display: block;
    padding: 0.5rem 2rem;
	white-space: nowrap;
}


/* ==================================================
   MENU MOBILE TOGGLE
================================================== */

.menu-toggle {
    display: none;

    background: none;
    border-top: 2px solid #222;
    border-bottom: none;

    padding: .5rem 1rem;
    cursor: pointer;

    align-items: center;
    justify-content: center;
    gap: .6rem;

    font: inherit;
}

.menu-text {
    color: #000;
    font-size:1.4rem;
    font-family: Ronzino-Medium;
}

/* état normal desktop */
.site-nav {
    display: block;
}

/* hamburger */
.burger {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    pointer-events: none; /* important : évite interaction bizarre */
}

.burger span {
    width: 18px;
    height: 2px;
    background: #000;
}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 768px) {
    
    .site-header {
        position: relative;
    }
    .site-header nav ul li:hover{
    	border-top: 2px solid #222;
    	border-bottom: 2px solid #222;
    }

    .menu-toggle {
        width: 100%;
        background-color: #fff;
        display: flex;
    }
    

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index:100;
    }

    .site-nav.active {
        display: block;
    }

    .site-header nav ul {
        flex-direction: column;
        gap: 0;
    }
}


/* ==================================================
   ANNONCE TEXTE DEFILANT
================================================== */

#annonce {
	max-width: 100vw;
	background-color: #222;
	overflow: hidden;
	padding: 0.7rem 1rem;
}

#annonce:hover a{
    animation-play-state: paused;
}

#annonce-texte {
  display: inline-block;
  white-space: nowrap;
  animation: annonceScroll 20s infinite linear;
}

#annonce-texte span {
  font-size: 1.2rem;
  margin: 1vw;
  transition: 0.3s ease-out;
}

.annonce-texte-noir{
  color:white;
}

.annonce-texte-blanc{
  background: white;
  color: black;
}

.annonce-texte-noir:hover{
  color:Gainsboro;
}

.annonce-texte-blanc:hover{
  background: Gainsboro;
}

@keyframes annonceScroll {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ==================================================
   LAYOUT GLOBAL
================================================== */

.homepage,
.category-page,
.site-main {
    width: min(1600px, 80%);
    margin: 0 auto;
    padding: 1.4rem 0;
}

/* ==================================================
   LISIBILITÉ TEXTE
================================================== */

.single-content,
.editor-content,
.product-description,
.product-extra {
    max-width: 70ch;
}

.single-content p,
.editor-content p,
.product-description p,
.product-extra p {
    margin-bottom: 1rem;
}

/* ==================================================
   TITRE H1
================================================== */

h1{
    font-size:1.6rem;
    line-height: 1.4;
    padding: 0 0 1.4rem 4rem;
}
@media (max-width: 768px) {

    h1 {
        padding-left: 0;
    }

}
#alaune span{
    color: silver;
    font-family:Ronzino-Oblique;
    font-size: 1.5rem;
    padding-left: 1rem;
}

/* ==================================================
   GRILLE ARTICLES
================================================== */

.articles-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ==================================================
   CARTE ARTICLE
================================================== */

.article-card {
    position: relative;
}

.article-card a {
    display: block;
}

.article-card h2{
    font-family: "Ronzino-Regular";
}

.article-card__image-wrapper {
    width: 100%;
    aspect-ratio: 5 / 4;

    position: relative;

    border: 1px solid #222;
}
.article-card__image {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
}

.article-card__image-wrapper:hover {
    border: 1px solid var(--dominant-color);
}
.article-card:hover a {
    background-color: var(--dominant-color, #f5f5f5);
    color: white;
}

.post-badge {
    position: absolute;
    top: -10px;
    left: -10px;

    width: 55px;
    height: 55px;
    border-radius: 50%;

    background: var(--dominant-color, #gray);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0.9rem;
    font-family: "Ronzino-Medium", sans-serif;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;

    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.article-card__title {
    padding: 0.5rem;
    font-size: 1rem;
	font-family:Ronzino-Medium;
}

/* ==================================================
   SINGLE / PAGES
================================================== */

.single-layout,
.page-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.gallery-caption {
    padding: 0.5rem 0 2rem;
    font-family: Ronzino-Oblique;
    color: #999;
}

.single-layout img,
.page-layout img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}




.single-content figure {
    width: 100% !important;
    max-width: 100%;
    margin: 2rem 0;
}

.single-content figure img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    display: block;
}

.single-content figcaption {
    font-family: "Ronzino-Oblique";
    color: #999;
    padding-top: 0.5rem;
}

/* ==================================================
   PRODUIT LAYOUT
================================================== */

.product-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ==================================================
   SLIDER (INTÉGRÉ ET STABLE)
================================================== */

.wp-gallery-slider {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

/* slides empilées */
.wp-gallery-slider .gallery-item {
    border: 1px solid black;

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    aspect-ratio: 1 / 1;

    opacity: 0;
    transition: opacity 1s ease;

    pointer-events: none;
}

/* slide active */
.wp-gallery-slider .gallery-item.active {
    opacity: 1;
    pointer-events: auto;

    position: relative;
}

.wp-gallery-slider .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* thumbnails */
.wp-gallery-slider .slider-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 15px;
}

.wp-gallery-slider .slider-thumb {
    width: 70px;
    height: 70px;

    object-fit: cover;

    flex: 0 0 auto;
    cursor: pointer;

    opacity: 0.5;
    border: 1px solid transparent;
}

.wp-gallery-slider .slider-thumb.active-thumb {
    opacity: 1;
    border-color: #000;
}

/* ==================================================
   INFOS PRODUIT
================================================== */

.product-gallery {
    display: block; /* important : laisse le slider gérer */
}

.product-info h1 {
    padding-left:0;
}

.product-price{
    font-size:1.4rem;
    font-family: Ronzino-Regular, sans-serif;
    padding-bottom: 1rem;
}
#livraison{
    color:gray;
    font-size:1rem;
    font-family: Ronzino-Oblique;
    
}
.product-description{
    max-width: 65ch;
}

.product-extra{
    font-family: Ronzino-Regular, sans-serif;
    color: gray;
    padding-bottom: 2rem;
}

#commander{
    display: inline-block;
    padding: 0.8rem 1.2rem 0.8rem 1rem;
    border: 3px solid black;
    border-radius: 15px;
    
    font-size: 1.2rem;
    font-family:Ronzino-Medium;
    line-height: 1.4;
    
    transition: 0.3s ease-out;
}

#commander span{
    font-size: 1rem;
    font-family:Ronzino-Oblique;
}
#commander:hover{
    background: WhiteSmoke;
}

/* ==================================================
   FOOTER
================================================== */

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

#colophon{
    margin-top: auto;
	padding: 2vh 0;
	text-align: center;
	color: Silver;
	box-shadow: 0 1px 5px Gainsboro inset;
}

/* ==================================================
   RESPONSIVE
================================================== */

/* 3 colonnes */
@media (max-width: 1200px) {

    .articles-list {
        grid-template-columns: repeat(3, 1fr);
    }

}

/* 2 colonnes */
@media (max-width: 768px) {

    .articles-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .single-layout,
    .page-layout,
    .product-layout {
        grid-template-columns: 1fr;
    }

    .site-header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .product-layout > * {
        min-width: 0;
    }

}

/* 1 colonne */
@media (max-width: 480px) {

    .articles-list {
        grid-template-columns: 1fr;
    }

}