
/* =========================
   POLICE
========================= */

@font-face {
    font-family: "American Typewriter Condensed";
    src: url("assets/fonts/AmericanTypewriter-Condensed.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* =========================
   BASE
========================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #111;
    background: white;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    width: 100%;
    min-height: 100vh;
    background: white;
}

/* =========================
   EN-TÊTE
========================= */

.site-header {
    position: relative;
    width: 100%;
    height: 65px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #d3e7f0;
}

.header-logo-left {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.header-logo-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: 175px;
    max-height: 55px;
    object-fit: contain;
}

/* Menu burger */

.header-menu {
    position: relative;
    margin-left: auto;
    z-index: 20;
}

.header-menu-icon {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 35px;
    cursor: pointer;
    list-style: none;
}

.header-menu-icon::-webkit-details-marker {
    display: none;
}

.header-menu-icon span {
    display: block;
    width: 30px;
    height: 3px;
    background: black;
    border-radius: 3px;
}

.header-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 230px;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #888;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.header-dropdown a {
    display: block;
    padding: 18px 15px;
    color: black;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
}

.header-dropdown a + a {
    border-top: 1px solid #999;
}

.header-dropdown a:hover {
    background: #eee;
}

/* =========================
   CONTENU
========================= */

.main-content {
    padding: 42px 34px 58px;
}

.preview-card h1,
.workspace h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 400;
}

/* =========================
   APERÇU
========================= */

.preview-frame {
    min-height: 190px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    background: #d5d5d5;
    border: 1px solid #5f5f5f;
}

.scarf-preview {
    width: 100%;
    height: 156px;
    overflow: hidden;
    background: #efefef;
}

.stripes {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.stripe {
    height: 100%;
    flex: 0 0 auto;
}

/* =========================
   CONFIGURATION
========================= */

.workspace {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}

.configuration-card,
.palette-column {
    background: #ddd;
    border: 1px solid #4f4f4f;
    box-shadow: 6px 7px 2px rgba(0, 0, 0, 0.18);
}

.configuration-card {
    padding: 28px 24px 30px;
}

.control-block + .control-block {
    margin-top: 34px;
}

.control-title {
    margin: 0 0 18px;
    font-size: 16px;
}

.series-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.series-button {
    min-height: 30px;
    border: 1px solid #888;
    background: #b7b7b7;
    color: #111;
}

.series-button.is-active {
    background: #f7f7f7;
}

.slider-wrap {
    padding-top: 2px;
}

#thicknessSlider {
    width: 100%;
    accent-color: #888;
}

.slider-labels {
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
}

/* Bouton Valider */

.validate-button {
    display: block;
    width: 76%;
    min-height: 36px;
    margin: 36px auto 0;
    border: 1px solid #555;
    background: #e6e6e6;
    box-shadow: 5px 6px 2px rgba(0, 0, 0, 0.18);
    font-size: 18px;
}

.validate-button:disabled {
    cursor: not-allowed;
    opacity: 1;
}

/* =========================
   PALETTE
========================= */

.palette-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.palette-heading {
    display: flex;
    align-items: center;
    gap: 20px;
}

.palette-heading h2 {
    margin: 0;
    flex: 0 0 auto;
}

.selected-colors {
    min-height: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    background: #d7d7d7;
    border-radius: 999px;
}

.selected-chip-dot {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 1px solid #555;
    background: var(--chip-color);
}

.selected-chip-remove {
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
}

.palette-column {
    padding: 30px 44px 32px;
}

.color-palette {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 18px;
}

.color-button {
    position: relative;
    min-height: 62px;
    padding: 14px 42px 14px 14px;
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    background: var(--button-color);
    color: var(--button-text, #111);
    box-shadow: 4px 5px 2px rgba(0, 0, 0, 0.14);
    text-align: left;
}

.color-button.is-selected {
    border-color: #2f00ff;
}

.color-name {
    font-family: "American Typewriter Condensed", serif;
    font-size: 23px;
}

.color-star {
    position: absolute;
    top: 8px;
    right: 12px;
    color: #e8e8e8;
    font-size: 24px;
    line-height: 1;
}

.color-button.is-selected .color-star {
    color: #2f00ff;
}

.color-button.is-locked:not(.is-selected) {
    opacity: 0.58;
    cursor: not-allowed;
}

/* =========================
   TABLETTE
========================= */

@media (max-width: 900px) {

    .workspace {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .configuration-column {
        display: contents;
    }

    .configuration-column h2 {
        order: 1;
    }

    .configuration-card {
        order: 2;
        width: 100%;
    }

    .palette-section {
        order: 3;
        width: 100%;
    }

    .validate-button {
        order: 4;
        width: 230px;
        max-width: 100%;
        margin: 12px auto 0;
    }

    .color-palette {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================
   TÉLÉPHONE COMPACT
========================= */

@media (max-width: 900px) {

    /* En-tête compact */
    .site-header {
        height: 45px;
        padding: 0 12px;
    }

    .header-logo-left {
        width: 26px;
        height: 26px;
    }

    .header-logo-center {
        width: 105px;
        max-height: 38px;
    }

    .header-menu-icon {
        width: 30px;
        height: 28px;
        gap: 4px;
    }

    .header-menu-icon span {
        width: 24px;
        height: 2px;
    }

    .header-dropdown {
        top: 34px;
        width: 190px;
        max-width: calc(100vw - 24px);
    }

    .header-dropdown a {
        padding: 10px;
        font-size: 12px;
    }

    /* Marges */
    .main-content {
        padding: 10px 10px 24px;
    }

    .preview-card h1,
    .workspace h2 {
        font-size: 13px;
        margin-bottom: 5px;
    }

    /* Aperçu toujours visible */
    .preview-card {
        position: sticky;
        top: 0;
        z-index: 10;
        background: white;
        padding: 4px 0 8px;
    }

    .preview-frame {
        height: 34px;
        min-height: 0;
        padding: 3px 5px;
        overflow: hidden;
    }

    .scarf-preview {
        height: 26px;
        min-height: 0;
        font-size: 11px;
    }

    .stripes,
    .stripe {
        height: 100%;
    }

    /* Configuration compacte */
    .workspace {
        margin-top: 8px;
        gap: 10px;
    }

    .configuration-card {
        padding: 10px 12px;
        box-shadow: 3px 3px 1px rgba(0, 0, 0, 0.15);
    }

    .control-block + .control-block {
        margin-top: 12px;
    }

    .control-title {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .series-button {
        min-height: 26px;
        font-size: 12px;
    }

    .slider-wrap {
        padding-top: 0;
    }

    #thicknessSlider {
        margin: 3px 0;
    }

    .slider-labels {
        margin-top: 0;
        font-size: 10px;
    }

    /* Palette compacte */
    .palette-section {
        gap: 6px;
    }

    .palette-heading {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .selected-colors {
        min-height: 18px;
        gap: 5px;
    }

    .selected-chip {
        gap: 3px;
        padding: 2px 5px;
    }

    .selected-chip-dot {
        width: 12px;
        height: 12px;
    }

    .selected-chip-remove {
        font-size: 14px;
    }

    .palette-column {
        padding: 10px;
        box-shadow: 3px 3px 1px rgba(0, 0, 0, 0.15);
    }

    .color-palette {
        margin-top: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .color-button {
        min-height: 36px;
        padding: 5px 17px 5px 5px;
        border-width: 1px;
        box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.14);
    }

    .color-name {
        font-size: 13px;
        line-height: 1;
        overflow-wrap: anywhere;
    }

    .color-star {
        top: 3px;
        right: 3px;
        font-size: 13px;
    }

    /* Valider après la palette */
    .validate-button {
        width: 150px;
        min-height: 30px;
        margin: 5px auto 0;
        font-size: 13px;
        box-shadow: 3px 3px 1px rgba(0, 0, 0, 0.15);
    }
}
@media (max-width: 900px) {

    /* Aperçu */
    .preview-frame {
        height: 90px;
        padding: 7px;
    }

    .scarf-preview {
        height: 74px;
    }

    /* Titres */
    .preview-card h1,
    .workspace h2 {
        font-size: 19px;
    }

    .control-title {
        font-size: 16px;
    }

    /* Configuration */
    .configuration-card {
        padding: 20px;
    }

    .control-block + .control-block {
        margin-top: 23px;
    }

    .series-button {
        min-height: 40px;
        font-size: 16px;
    }

    .slider-labels {
        font-size: 13px;
    }

    /* Palette */
    .palette-column {
        padding: 19px;
    }

    .color-palette {
        gap: 12px;
    }

    .color-button {
        min-height: 55px;
        padding: 9px 24px 9px 9px;
    }

    .color-name {
        font-size: 19px;
    }

    .color-star {
        font-size: 19px;
        right: 6px;
        top: 6px;
    }

    /* Espacement */
    .workspace {
        gap: 18px;
    }
}

/* =========================
   POP-UP DE VALIDATION
   ========================= */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/Archivo-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

.popup-overlay[hidden] {
  display: none;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;

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

  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  box-sizing: border-box;
}

.popup-content {
  display: grid;
  grid-template-columns: 47.3% 52.7%;

  width: min(1068px, 100%);
  height: min(720px, 90vh);

  background: white;
  overflow: hidden;
  box-sizing: border-box;
  font-family: "Archivo", Arial, sans-serif;
  color: #111;
}

/* PHOTO À GAUCHE */

.popup-image {
  min-width: 0;
  min-height: 0;
}

.popup-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* ===== POP-UP NINAABRUNAA ===== */

.popup-overlay[hidden] {
  display: none !important;
}

.popup-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  background: rgba(0, 0, 0, 0.62) !important;
  box-sizing: border-box !important;
}

.popup-overlay .popup-content {
  display: grid !important;
  grid-template-columns: 47% 53% !important;
  width: min(1068px, 100%) !important;
  height: min(720px, 90vh) !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: white !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.popup-overlay .popup-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.popup-overlay .popup-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.popup-overlay .popup-text {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  padding: 72px 35px 45px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  font-family: "Archivo", Arial, sans-serif !important;
  color: #111 !important;
  text-align: center !important;
}

.popup-overlay .popup-text h2 {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 21px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

.popup-overlay .popup-brand-logo {
  display: block !important;
  width: 150px !important;
  max-height: 45px !important;
  margin: 4px auto 0 !important;
  object-fit: contain !important;
}

.popup-overlay .popup-description {
  display: block !important;
  width: 100% !important;
  margin: 90px 0 0 !important;
  padding: 0 !important;
}

.popup-overlay .popup-description p {
  display: block !important;
  width: 100% !important;
  margin: 0 0 25px !important;
  padding: 0 !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

.popup-overlay .popup-bottom {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  margin: auto 0 0 !important;
  padding: 35px 0 0 !important;
}

.popup-overlay .popup-question {
  display: block !important;
  width: 100% !important;
  margin: 0 0 30px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.popup-overlay .popup-confirm {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  width: 237px !important;
  height: 46px !important;
  min-height: 0 !important;
  padding: 5px 20px !important;
  margin: 0 !important;
  border: 2px solid #888 !important;
  border-radius: 15px !important;
  background: white !important;
  color: #111 !important;
  font-family: "American Typewriter Condensed", serif !important;
  font-size: 23px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.popup-overlay .popup-close {
  position: absolute !important;
  top: 22px !important;
  right: 34px !important;
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #111 !important;
  font: 28px/1 Arial, sans-serif !important;
  cursor: pointer !important;
}

/* TÉLÉPHONE */

@media (max-width: 700px) {
  .popup-overlay {
    padding: 12px !important;
  }

  .popup-overlay .popup-content {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
  }

  .popup-overlay .popup-image {
    height: 200px !important;
    flex: 0 0 200px !important;
  }

  .popup-overlay .popup-text {
    height: auto !important;
    padding: 42px 20px 25px !important;
    overflow: visible !important;
  }

  .popup-overlay .popup-close {
    top: 10px !important;
    right: 12px !important;
  }

  .popup-overlay .popup-text h2 {
    font-size: 17px !important;
  }

  .popup-overlay .popup-description {
    margin-top: 25px !important;
  }

  .popup-overlay .popup-description p {
    margin-bottom: 16px !important;
    font-size: 14px !important;
  }

  .popup-overlay .popup-bottom {
    padding-top: 12px !important;
  }

  .popup-overlay .popup-question {
    margin-bottom: 18px !important;
    font-size: 15px !important;
  }

  .popup-overlay .popup-confirm {
    width: 180px !important;
    height: 40px !important;
    font-size: 19px !important;
  }
}
