/* ── Nuances Frontend CSS ─────────────────────────────────────────────────── */
/* Variables overridables par le thème */
:root {
    --nua-primary:      #F0B600;
    --nua-primary-dark: #F0B600;
    --nua-accent:       #e8a020;
    --nua-border:       #d0d7e3;
    --nua-bg:           #f7f9fc;
    --nua-radius:       25px;
    --nua-font:         -apple-system, blinkmacsystemfont, "segoe ui", roboto, "oxygen-sans", ubuntu, cantarell, "helvetica neue", helvetica, arial, sans-serif;
}

h2,H3 {
    border-bottom: 2px solid #4a5c68;
}
.nuances-search-wrap {
    font-family: var(--nua-font);
    max-width: 1080px;
    margin: 0 auto;
}

/* ── Barre de recherche ───────────────────────────────────────────────────── */

.nuances-search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nuances-input {
    flex: 1 1 300px;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--nua-border);
    border-radius: var(--nua-radius);
    outline: none;
    transition: border-color .2s;
    touch-action: auto !important;
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-tap-highlight-color: initial !important;
}
.nuances-input:focus { border-color: var(--nua-primary); }

.nuances-famille-filter {
    padding: 11px 14px;
    border: 2px solid var(--nua-border);
    border-radius: var(--nua-radius);
    font-size: 14px;
    background: #fff;
}

.nuances-btn-search {
    display : none !important;
    padding: 12px 24px;
    background: var(--nua-primary);
    color: #fff;
    border: none;
    border-radius: var(--nua-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.nuances-btn-search:hover { background: var(--nua-primary-dark); }

.nuances-search-area {
    position: relative;
}

.nuances-suggestions,
.nuances-no-results {
    position: absolute;
    top: calc(100%);
    left: 0;
    width: 100%;
box-sizing: border-box;
    z-index: 998;

    background: #fff;

    box-shadow:
        0 8px 24px rgba(0,0,0,0.08);

    border-radius: 12px;
}

/* ── Suggestions autocomplete ─────────────────────────────────────────────── */

.nuances-suggestions {
    position: relative;
    background: #fff;
    border-radius: var(--nua-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    z-index: 1000;
    margin-bottom: 8px;
    width: calc(100% - 166px);
}

.nuances-suggest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.nuances-suggest-item:last-child { border-bottom: none; }
.nuances-suggest-item:hover,
.nuances-suggest-item.active { background: var(--nua-bg); }

.nua-suggest-label { font-weight: 600; font-size: 14px; }
.nua-suggest-meta  { font-size: 12px; color: #777; }

/* ── Tableau résultats ────────────────────────────────────────────────────── */

.nuances-results-title {
    font-size: 21px;
    font-weight: 700;
    margin: 20px 0 10px;
    color: black;
    text-align : left;
}

.nuances-search-title {
    font-size: 21px;
    font-weight: 700;
    margin: 45px 0 10px;
    color: black;
    text-align : center;
}

.nuances-no-results-query{
    margin-top : unset;
}

.nuances-no-results-text, .nuances-no-results-links {
    margin : unset;
}

.nuances-table-wrap { overflow-x: auto; margin-bottom : 25px; }

.nuances-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.nuances-table thead{
    border-bottom: solid 2px grey !important;
}

.nuances-table thead th {
    padding: 2px 5px !important;
    font-size : 16px;
    text-align: left;
    font-weight: bold;
    white-space: nowrap;
    border: 1px solid #80808040;
}

.nuances-table tbody tr {
    border-bottom: 1px solid var(--nua-border);
    transition: background .15s;
}

.nuances-table td {
    padding: 2px 5px !important;
    height : 30px;
    vertical-align: middle;
    text-align: left;
    border: 1px solid #80808040;
}

.nuances-table tbody tr:nth-child(odd) {
    background: #f0f0f0;
}

.nuances-pdf-link {
    display: inline-block;
    padding: 4px 10px;
    background: white;
    border : 1px solid #F0B601;
    color: #F0B601 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
}

.nuances-pdf-link:hover { 
    background: #FFF7E2; 
}

.nuances-detail-link {
    color: #F0B601 !important;
    font-size: 13px;
    text-decoration: underline;
    font-weight: 600;
}

.nuances-no-results-links a {
    color: #F0B601 !important;
    text-decoration: underline;
    font-weight: 600;
}

.nuances-detail-link:hover, .nuances-no-results-links a:hover, .nuance-related-designation:hover { color : black !important; text-decoration: underline; }

/* ── Voir plus ────────────────────────────────────────────────────────────── */

.nuances-load-more {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* ── Recherches fréquentes ────────────────────────────────────────────────── */

.nuances-frequent-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 25px 0px 25px;
}

.nuances-frequent-label {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    color: black;
}

.nuances-frequent-item {
    background: transparent;
    border: none;
    color: #f0b601;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: underline;
    font-family: var(--nua-font);
}

.nuances-frequent-item:hover {
    background: transparent;
    color: black;
}

/* ── Bloc téléchargement ──────────────────────────────────────────────────── */

.nuances-download-block {
    margin-bottom: 40px;
    padding: 28px 32px;
    background: var(--nua-bg);
    background-color : #f0f0f0;
    border-radius: var(--nua-radius);
    display: flex;
    align-items: center;
    gap: 30px;
}

.nuances-download-content { 
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.nuances-download-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: black;
    margin: 0 0 8px;
}

.nuances-download-text {
    color: #555;
    margin: 0 0 16px;
    font-size: 14px;
}

.nuances-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: var(--nua-primary);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s;
}
.nuances-download-btn:hover { background: var(--nua-primary-dark); color: #fff; }

.nuances-final{
    text-align : center;
    font-style: italic;
}

@media (max-width: 640px) {
    .nuances-suggestions,
.nuances-no-results {
    width:100%;
}
    .nuances-download-block { flex-direction: column; gap: 16px; }
}

.nuances-loading {
    text-align: center;
    padding: 30px;
    color: #777;
    font-style: italic;
}

.nuances-no-results {
    text-align: left;
    padding: 30px;
    color: #555;
    background: var(--nua-bg);
    border-radius: var(--nua-radius);
    border: 1px dashed var(--nua-border);
    width: calc(100% - 166px);
}

.nuances-error { color: #c00; font-style: italic; }

/* ── Page détail nuance ───────────────────────────────────────────────────── */

.nuance-detail-wrap { margin: 0 auto; }

.nuance-tech-table {
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    width : 100%;
}

.nuance-tech-table thead{
    border-bottom: solid 2px grey !important;
}

.nuance-tech-table tbody tr:nth-child(odd) {
    background: #f0f0f0;
}

.nuance-tech-table th,
.nuance-tech-table td {
    padding: 2px 5px !important;
    border: 1px solid #80808040;
    text-align: left;
}
.nuance-tech-table th {
    font-weight: bold;
    font-size: 16px;
}

.nuance-section { margin: 30px 0; }
.nuance-section h3 {
    color: var(--nua-primary);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--nua-border);
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.nuance-pdf-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--nua-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    margin-top: 20px;
    transition: opacity .2s;
}
.nuance-pdf-cta:hover { opacity: .9; }

@media (max-width: 640px) {
    .nuances-search-bar { flex-direction: column; max-height: 50px; }
    .nuances-input { width: 100%; box-sizing : border-box; }
    .nuances-famille-filter, .nua-suggest-meta{ display : none;}
    .nuances-table { font-size: 12px; }
    .nuances-table th, .nuances-table td { padding: 8px; }
    .nuances-frequent-label::after {
    content: "\A";
    white-space: pre;
  }
  .nuances-frequent-label {
    display: block;
  }
  .nuances-frequent-label {
    width: 100%;
  }
  .nuances-no-results{
      width : 100%;
  }
  .nuance-tech-table {
    display: block;
    overflow-x: auto;
  }
  .nuance-section a{
      width : 100% !important;
  }
}

/* ── Nuances liées ────────────────────────────────────────────────────────── */

.nuance-related-grid{
    display : flex;
    flex-wrap: wrap;
    gap : 10px;
}

.nuance-related-designation {
    font-weight: 700;
    color: var(--nua-primary);
    font-size: 15px;
    text-decoration : underline;
}



.nuance-related-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #555;
}

.nuance-related-link {
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--nua-primary);
    text-decoration: none;
}
.nuance-related-link:hover { text-decoration: underline; }

/* ── Bloc devis ───────────────────────────────────────────────────────────── */

.nuance-quote-block {
    margin-top: 50px;
    padding: 25px 15px;
    background: #f5f5f5;
    text-align: center;
    color: #fff;
}

.nuances-quote-block{
    margin-top: 50px;
    padding: 25px 15px;
    background: #f5f5f5;
    text-align: center;
}

.nuance-quote-title {
    font-size: 1rem;
    font-weight: 600;
    margin: unset;
    color : black;
}

.nuance-quote-text {
    font-size: 1rem;
    color: #4a5c68;
    line-height: 1.6;
    max-width : 80%;
    margin-left : auto;
    margin-right : auto;
    white-space: pre-line;
}

.nuances-quote-content a{
    max-width: 200px;
    margin : 0 auto;
}

.nuance-quote-btns{
    display: flex;
    gap: 20px;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
}

.nuance-pdf-section{
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
