/*
Theme Name: Twenty Thirteen Smart Music (Child)
Template: twentythirteen
Version: 1.0.0
Description: Thème enfant Smart Music basé sur Twenty Thirteen (CSS custom + Gutenberg + Gravity Forms).
Text Domain: twentythirteen-smartmusic
*/

/* ===================================================
   SMART MUSIC - CSS COMPLET OPTIMISÉ (CORRIGÉ)
   - Media queries non imbriquées
   - Fix footer iPhone + protection alignfull/alignwide
   - Boutons Gutenberg alignés DA Smart Music
   - Gravity Forms mobile aéré (sans impacter desktop)
   =================================================== */

/* ==== RESET BOX-SIZING ==== */
* { box-sizing: border-box; }

/* ==== TYPOGRAPHIE & BODY ==== */
body, button, input, textarea, select {
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.66;
    color: #eeeeee;
    background-color: #222;
    margin: 0;
}

strong, b {
    color: #F5F5F5;
    font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.75em;
    line-height: 1.4;
}

h1 {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    font-size: 33px;
    font-weight: 300;
}

h2 {
    font-size: 30px;
    font-weight: 400;
    margin-top: 50px;
    margin-bottom: 40px;
    color: #ef5466;
    text-align: center;
}
h3 {
    font-size: 25px;
    font-weight: 400;
    margin-top: 60px;
    margin-bottom: 25px;
    color: #ef5466;
}

/* ==== LIENS ==== */
a {
    position: relative;
    color: #FFF;
    text-decoration: none;
    font-weight: 300;
}

a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 40%;
    height: 2px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
}

a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #B026FF, #EF5466);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
    border-radius: 2px;
}

a:hover::after { transform: scaleX(1); }
a:hover { color: #EF5466; }

/* ==== HEADER ==== */
.site-header .home-link {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    padding: 0 20px;
    min-height: 90px;
}

.site-title {
    font-size: 42px;
    font-weight: bold;
    line-height: 1;
    padding: 18px 0 6px;
}

.site-description {
    font: 300 italic 24px "Source Sans Pro", Helvetica, sans-serif;
    margin: 0;
}

/* ==== CONTENT ==== */
.entry-content, .entry-summary, .entry-header {
    margin: 0 auto;
    max-width: 1040px;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* ==== IMAGES & MEDIA ==== */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Alignement rapide */
.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* ==== BOUTONS (génériques) ==== */
button, input[type="submit"] {
    font-family: inherit;
    background: #ef5466;
    color: #fff;
    border: none;
    border-radius: 2px;
    padding: 11px 24px 10px;
}

button:hover, input[type="submit"]:hover {
    background: #e55627;
}

/* Boutons Gutenberg : aligne sur la DA Smart Music (évite conflit blocks.css) */
.wp-block-button__link {
    background-color: #ef5466 !important;
    color: #ffffff !important;
    border: none !important;
    border-bottom: 0 !important;
    border-radius: 2px;
    padding: 11px 24px 10px;
    text-decoration: none;
}

/* Coupe les pseudo-éléments sur boutons Gutenberg (évite underline animés) */
.wp-block-button__link::before,
.wp-block-button__link::after {
    content: none !important;
    display: none !important;
}

/* Hover/Focus Gutenberg */
.wp-block-button__link:hover,
.wp-block-button__link:focus {
    background-color: #e55627 !important;
    color: #ffffff !important;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Empêche toute animation/transition sur les boutons Gutenberg */
.wp-block-button__link {
    transition: none !important;
    animation: none !important;
}

/* ==== FORMULAIRE – GRAVITY FORMS ==== */
.gform_wrapper {
    padding: 0;
    background-color: #222;
    border-radius: 8px;
}

/* Inputs, textarea, select */
.gform_wrapper input:not([type="checkbox"]):not([type="radio"]),
.gform_wrapper textarea,
.gform_wrapper select {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
}

.gform_wrapper ::placeholder {
    color: #999999;
    opacity: 1;
}

/* Boutons Gravity Forms – FIX DEFINITIF */
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_page_footer input[type="submit"],
.gform_wrapper input.gform_button,
.gform_wrapper button.gform_button {
    background-color: #ef5466 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px;
    padding: 12px 28px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_page_footer input[type="submit"]:hover,
.gform_wrapper input.gform_button:hover,
.gform_wrapper button.gform_button:hover {
    background-color: #e55627 !important;
    transform: translateY(-1px);
}

.gform_wrapper .gform_footer input[type="submit"]:focus,
.gform_wrapper .gform_page_footer input[type="submit"]:focus,
.gform_wrapper input.gform_button:focus,
.gform_wrapper button.gform_button:focus {
    outline: 2px solid #ef5466;
    outline-offset: 2px;
}

/* ==== CHECKBOX / RADIO (desktop OK, mobile géré plus bas) ==== */
.gform_wrapper .gfield_checkbox li,
.gform_wrapper .gfield_radio li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    list-style: none;
    padding: 0;
}

.gform_wrapper .gchoice input[type="checkbox"],
.gform_wrapper .gchoice input[type="radio"] {
    width: auto !important;
    height: auto !important;
    margin-right: 10px !important;
    vertical-align: middle;
    flex-shrink: 0;
}

.gform_wrapper .gchoice label {
    display: inline-block;
    line-height: 1.4;
    cursor: pointer;
    margin: 0;
}

/* ==== FOOTER ==== */
.site-footer {
    background-color: #373737;
    color: #eeeeee;
    font-size: 16px;
    text-align: left;
    padding: 40px 0 60px 0;
}

.footer-content {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

.footer-top {
    text-align: left;
    margin-bottom: 30px;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.footer-column {
    flex: 1 1 1;
    margin-bottom: 20px;
}

.footer-column h4 {
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.site-footer a {
    color: #e8e8e8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-socials a svg {
    width: 28px;
    height: 28px;
    fill: #d9d9d9;
    transition: fill 0.3s;
}

.footer-socials a:hover svg {
    fill: #EF5466;
}

/* ===== Sécurité : évite que alignfull/alignwide (blocks.css) casse le footer ===== */
.site-footer .alignfull,
.site-footer .alignwide,
.site-footer .wp-block-group.alignfull,
.site-footer .wp-block-group.alignwide {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ==== MOBILE RESPONSIVE (UN SEUL BLOC - CORRECT) ==== */
@media (max-width: 767px) {

    /* Sliders SmartSlider3 pleine largeur */
    .n2-section-smartslider,
    .wp-block-nextend-smartslider3,
    .n2-ss-slider {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .entry-content,
    .entry-summary,
    .hentry {
        padding-left: 5px;
        padding-right: 5px;
    }

    h2 { margin-top: 30px; margin-bottom: 20px; }
    h3 { margin-top: 40px; margin-bottom: 30px; }

    p { margin-left: 0; margin-right: 0; }

    /* Formulaires responsive (hors checkbox / radio) */
    .entry-content input:not([type="checkbox"]):not([type="radio"]),
    .entry-content textarea,
    .entry-content select,
    .entry-content button {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Gravity Forms : checkbox / radio confort mobile */
    .gform_wrapper .gfield_checkbox li,
    .gform_wrapper .gfield_radio li {
        margin-bottom: 18px !important;
        align-items: flex-start;
    }

    .gform_wrapper .gchoice {
        display: flex;
        align-items: flex-start;
    }

    .gform_wrapper .gchoice input[type="checkbox"],
    .gform_wrapper .gchoice input[type="radio"] {
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 4px 10px 0 0 !important;
        vertical-align: middle;
        flex-shrink: 0;
    }

    .gform_wrapper .gchoice label {
        line-height: 1.7 !important;
        cursor: pointer;
        margin: 0;
    }

    /* Footer mobile : padding latéral confortable (fix iPhone) */
    .site-footer .footer-content,
    #colophon .footer-content {
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
    }

    /* Sécurité : empêche un enfant en 100vw de dépasser */
    .site-footer {
        overflow-x: hidden;
    }
}

/* ==== TABLETTE ==== */
@media (max-width: 960px) {
    .site-title { font-size: 30px; }
    .entry-content, .entry-header, .entry-summary { padding-left: 10px; padding-right: 10px; }
}

/* ==== PRINT ==== */
@media print {
    body { background: none !important; color: #000; font-size: 10pt; }
    .site, .site-header, .site-title, .site-footer, .entry-content img { max-width: 100%; }
}

/* Font Awesome optimisation */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-display: swap;
}

/* =========================
   SMART MUSIC - GRILLE CATEGORIES (FINAL) — CLEAN + FA
   ========================= */

.sm-musicians-grid,
.sm-musicians-grid .sm-grid{
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.sm-musicians-grid .sm-grid{
  width: 100% !important;
  max-width: none !important;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.sm-item{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.sm-item:hover{
  transform: translateY(-1px);
  background: rgba(239,84,102,0.08);
  border-color: rgba(239,84,102,0.45);
}

.sm-role{
  font-size: 16px;
  color: #e0e0e0;
  line-height: 1.35;
}

/* Pastille icône */
.sm-ico{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background-color: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* nécessaire pour le petit éclair */
  transition: transform .35s cubic-bezier(.4,0,.2,1),
              background-color .35s ease,
              border-color .35s ease;
}

/* Font Awesome */
.sm-ico i{
  font-size: 20px;
  line-height: 1;
  color: #cfcfcf;
  transition: transform .35s cubic-bezier(.4,0,.2,1),
              color .35s ease;
}

/* Hover subtil & pro */
.sm-item:hover .sm-ico{
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(239,84,102,0.6);
  background-color: rgba(239,84,102,0.12);
}

.sm-item:hover .sm-ico i{
  transform: scale(1.10);
  color: #ef5466;
}

/* Badge "En option" */
.sm-musicians-grid .sm-badge{
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
  vertical-align: middle;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #cfcfcf;
}

.sm-musicians-grid .sm-badge--option{
  border-color: rgba(239,84,102,0.45);
  background: rgba(239,84,102,0.12);
  color: #ef5466;
  font-weight: 600;
}

/* Guitare "électrique" : petit éclair */
.sm-ico-electric .sm-ico-bolt{
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 9px;
  color: #ef5466;
  opacity: 0.95;
  transform: none;
}

.sm-item:hover .sm-ico-electric .sm-ico-bolt{
  color: #ffffff;
}

/* Responsive */
@media (max-width: 720px){
  .sm-musicians-grid .sm-grid{ grid-template-columns: 1fr; }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce){
  .sm-ico,
  .sm-ico i,
  .sm-item:hover .sm-ico,
  .sm-item:hover .sm-ico i{
    transition: none !important;
    transform: none !important;
  }
}


/* ===================================================
   SMART MUSIC – ARTICLE HERO FULL WIDTH
   =================================================== */

.sm-article-hero{
  position: relative;
  display: block;

  /* 👉 PLEINE LARGEUR ÉCRAN */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  overflow: hidden;
  background: #373737;
  text-decoration: none;

  margin-top: 40px;
  margin-bottom: 40px;
}

/* CONTENU CENTRÉ */
.sm-article-hero__inner{
  position: relative;
  z-index: 2;
  padding: clamp(28px, 4vw, 60px);
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
  color: #f2f2f2;
}

/* --- HAUT : 3 BANDES EN BIAIS (centre → extérieur) --- */
.sm-article-hero::before{
  content: "";
  position: absolute;
  top: -70px;
  left: -10%;
  width: 120%;
  height: 140px;
  z-index: 1;

  background: linear-gradient(
    to top,
    #373737 0%,
    #373737 22%,

    #2f2f2f 22%,
    #2f2f2f 62%,

    #272727 62%,
    #272727 88%,

    #222222 88%,
    #222222 100%
  );

  transform: skewY(-4deg);
  transform-origin: top left;
  pointer-events: none;
}

/* --- BAS : MÊME DÉCOUPAGE --- */
.sm-article-hero::after{
  content: "";
  position: absolute;
  bottom: -70px;
  left: -10%;
  width: 120%;
  height: 140px;
  z-index: 1;

  background: linear-gradient(
    to bottom,
    #373737 0%,
    #373737 22%,

    #2f2f2f 22%,
    #2f2f2f 62%,

    #272727 62%,
    #272727 88%,

    #222222 88%,
    #222222 100%
  );

  transform: skewY(-4deg);
  transform-origin: bottom left;
  pointer-events: none;
}

/* SÉCURITÉ : AUCUN MOUVEMENT AU HOVER */
.sm-article-hero,
.sm-article-hero::before,
.sm-article-hero::after{
  transition: none !important;
}

.sm-article-hero:hover,
.sm-article-hero:focus{
  text-decoration: none;
  outline: none;
}


/* FORCE LES BLOCS GUTENBERG EN FULL WIDTH */
.wp-block-cover.alignfull,
.wp-block-group.alignfull,
.wp-block-image.alignfull{
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}


.entry-content > .alignfull{
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
